mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 04:25:01 +00:00
removed unnecessary string literal and simplified stuff
This commit is contained in:
parent
392e7fc56e
commit
afe0ec1194
17 changed files with 23 additions and 25 deletions
|
@ -30,8 +30,8 @@ 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);
|
||||
const currentUsername = user ? `${user.tag}` : args.userId;
|
||||
const user = await pluginData.client.users.fetch(args.userId as Snowflake).catch(() => null);
|
||||
const currentUsername = user ? user.tag : args.userId;
|
||||
|
||||
const nicknameDays = Math.round(NICKNAME_RETENTION_PERIOD / DAYS);
|
||||
const usernameDays = Math.round(NICKNAME_RETENTION_PERIOD / DAYS);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue