3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-07-08 03:27:20 +00:00

yeet renderUserUsername

Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
Tiago R 2023-11-26 15:57:23 +00:00
parent 4d0161a49f
commit bfc90093dc
24 changed files with 59 additions and 69 deletions

View file

@ -5,7 +5,7 @@ import { MAX_NICKNAME_ENTRIES_PER_USER } from "../../../data/GuildNicknameHistor
import { MAX_USERNAME_ENTRIES_PER_USER } from "../../../data/UsernameHistory";
import { NICKNAME_RETENTION_PERIOD } from "../../../data/cleanup/nicknames";
import { sendErrorMessage } from "../../../pluginUtils";
import { DAYS, renderUserUsername } from "../../../utils";
import { DAYS, renderUsername } from "../../../utils";
import { nameHistoryCmd } from "../types";
export const NamesCmd = nameHistoryCmd({
@ -31,7 +31,7 @@ export const NamesCmd = nameHistoryCmd({
const usernameRows = usernames.map((r) => `\`[${r.timestamp}]\` **${disableCodeBlocks(r.username)}**`);
const user = await pluginData.client.users.fetch(args.userId as Snowflake).catch(() => null);
const currentUsername = user ? renderUserUsername(user) : args.userId;
const currentUsername = user ? renderUsername(user) : args.userId;
const nicknameDays = Math.round(NICKNAME_RETENTION_PERIOD / DAYS);
const usernameDays = Math.round(NICKNAME_RETENTION_PERIOD / DAYS);