diff options
-rw-r--r-- | lib/badlinks.json5 | 5 | ||||
-rw-r--r-- | lib/badwords.json5 | 2 | ||||
-rw-r--r-- | package.json | 3 | ||||
-rw-r--r-- | src/commands/info/userInfo.ts | 8 | ||||
-rw-r--r-- | src/commands/leveling/leaderboard.ts | 4 | ||||
-rw-r--r-- | src/commands/utilities/suicide.ts | 2 | ||||
-rw-r--r-- | src/lib/extensions/discord-akairo/BushCommand.ts | 7 | ||||
-rw-r--r-- | src/listeners/commands/commandMissingPermissions.ts | 6 |
8 files changed, 24 insertions, 13 deletions
diff --git a/lib/badlinks.json5 b/lib/badlinks.json5 index f578812..4c7353d 100644 --- a/lib/badlinks.json5 +++ b/lib/badlinks.json5 @@ -119,6 +119,8 @@ "discorcl-gift.xyz", "discorcl.click", "discorcl.link", + "discorclapp.com", + "discord-accept.com" "discord-airdrop.com", "discord-app.net", "discord-app.ru.com", @@ -131,6 +133,7 @@ "discord.blog", "discord.givaewey.com", "discord.giveawey.com", + "discord.moscow", "discord.shop", "discordapp.click", "discordgift.info", @@ -389,5 +392,5 @@ "winskin-simple.xyz", "winskins.top", "wintheskin.xyz", - "xgamercup.com" + "xgamercup.com", ] diff --git a/lib/badwords.json5 b/lib/badwords.json5 index b94823a..727e168 100644 --- a/lib/badwords.json5 +++ b/lib/badwords.json5 @@ -43,7 +43,7 @@ "Лол, бесплатный дискорд нитро на 1 месяц!": 3, // Lol, 1 month free discord nitro! /* Misc Scams */ - "found a cool software that improves the": 3 + "found a cool software that improves the": 3, // 'tm5LcYN': 3, // '5gwLaOZ.png': 3, diff --git a/package.json b/package.json index 1641722..0fe96ca 100644 --- a/package.json +++ b/package.json @@ -176,7 +176,8 @@ "badlinks-secret.json5" ], "options": { - "singleQuote": false + "singleQuote": false, + "trailingComma": "es5" } } ] diff --git a/src/commands/info/userInfo.ts b/src/commands/info/userInfo.ts index 98ef3ae..b01c268 100644 --- a/src/commands/info/userInfo.ts +++ b/src/commands/info/userInfo.ts @@ -96,10 +96,10 @@ export default class UserInfoCommand extends BushCommand { const generalInfo = [ `**Mention:** <@${user.id}>`, `**ID:** ${user.id}`, - `**Created: **${createdAt} (${createdAtDelta} ago)` + `**Created:** ${createdAt} (${createdAtDelta} ago)` ]; if (user.accentColor !== null) generalInfo.push(`**Accent Color:** ${user.hexAccentColor}`); - if (user.banner) generalInfo.push(`**Banner**: [link](${user.bannerURL({ dynamic: true, format: 'png', size: 4096 })})`); + if (user.banner) generalInfo.push(`**Banner:** [link](${user.bannerURL({ dynamic: true, format: 'png', size: 4096 })})`); const pronouns = await util.getPronounsOf(user); if (pronouns) generalInfo.push(`**Pronouns:** ${pronouns}`); @@ -109,7 +109,7 @@ export default class UserInfoCommand extends BushCommand { const serverUserInfo = []; if (joinedAt) serverUserInfo.push( - `**${message.guild!.ownerId == user.id ? 'Created Server' : 'Joined'}: ** ${joinedAt} (${joinedAtDelta} ago)` + `**${message.guild!.ownerId == user.id ? 'Created Server' : 'Joined'}:** ${joinedAt} (${joinedAtDelta} ago)` ); if (premiumSince) serverUserInfo.push(`**Boosting Since:** ${premiumSince} (${premiumSinceDelta} ago)`); if (member?.displayHexColor) serverUserInfo.push(`**Display Color:** ${member.displayHexColor}`); @@ -120,7 +120,7 @@ export default class UserInfoCommand extends BushCommand { message.guild?.id == client.consts.mappings.guilds.bush ) serverUserInfo.push(`**General Deletions:** ⅓`); - if (member?.nickname) serverUserInfo.push(`**Nickname** ${member?.nickname}`); + if (member?.nickname) serverUserInfo.push(`**Nickname:** ${member?.nickname}`); if (serverUserInfo.length) userEmbed.addField('» Server Info', serverUserInfo.join('\n')).setColor(member?.displayColor ?? util.colors.default); diff --git a/src/commands/leveling/leaderboard.ts b/src/commands/leveling/leaderboard.ts index 4fb1765..432fc60 100644 --- a/src/commands/leveling/leaderboard.ts +++ b/src/commands/leveling/leaderboard.ts @@ -55,10 +55,10 @@ export default class LeaderboardCommand extends BushCommand { ); const ranks = (await Level.findAll({ where: { guild: message.guild.id } })).sort((a, b) => b.xp - a.xp); - const mapedRanks = ranks.map( + const mappedRanks = ranks.map( (val, index) => `\`${index + 1}\` <@${val.user}> - Level ${val.level} (${val.xp.toLocaleString()} xp)` ); - const chunked = util.chunk(mapedRanks, 25); + const chunked = util.chunk(mappedRanks, 25); const embeds = chunked.map((c) => new MessageEmbed().setTitle(`${message.guild!.name}'s Leaderboard`).setDescription(c.join('\n')) ); diff --git a/src/commands/utilities/suicide.ts b/src/commands/utilities/suicide.ts index a05cdaa..58119ef 100644 --- a/src/commands/utilities/suicide.ts +++ b/src/commands/utilities/suicide.ts @@ -33,7 +33,7 @@ export default class TemplateCommand extends BushCommand { **Text: HOME** to 741741 https://suicidepreventionlifeline.org/chat/ -Outside the U.S: Find a supportive resource on [this Wikipedia list of worldwide crisis hotlines](https://en.wikipedia.org/wiki/List_of_suicide_crisis_lines)` +**Outside the U.S**: Find a supportive resource on [this Wikipedia list of worldwide crisis hotlines](https://en.wikipedia.org/wiki/List_of_suicide_crisis_lines)` ) .addField( '**More Support**', diff --git a/src/lib/extensions/discord-akairo/BushCommand.ts b/src/lib/extensions/discord-akairo/BushCommand.ts index 073221d..548f921 100644 --- a/src/lib/extensions/discord-akairo/BushCommand.ts +++ b/src/lib/extensions/discord-akairo/BushCommand.ts @@ -139,8 +139,11 @@ export interface CustomBushArgumentOptions extends BaseBushArgumentOptions { export type BushMissingPermissionSupplier = (message: BushMessage | BushSlashMessage) => Promise<any> | any; export interface BushCommandOptions extends Omit<CommandOptions, 'userPermissions' | 'clientPermissions'> { + /** Whether the command is hidden from the help command. */ hidden?: boolean; + /** The channels the command is limited to run in. */ restrictedChannels?: Snowflake[]; + /** The guilds the command is limited to run in. */ restrictedGuilds?: Snowflake[]; description: { content: string; @@ -149,9 +152,13 @@ export interface BushCommandOptions extends Omit<CommandOptions, 'userPermission }; args?: BushArgumentOptions[] & CustomBushArgumentOptions[]; category: string; + /** A fake command, completely hidden from the help command. */ pseudo?: boolean; + /** Allow this command to be run in channels that are blacklisted. */ bypassChannelBlacklist?: boolean; + /** Permissions required by the client to run this command. */ clientPermissions?: PermissionResolvable | PermissionResolvable[] | BushMissingPermissionSupplier; + /** Permissions required by the user to run this command. */ userPermissions?: PermissionResolvable | PermissionResolvable[] | BushMissingPermissionSupplier; } diff --git a/src/listeners/commands/commandMissingPermissions.ts b/src/listeners/commands/commandMissingPermissions.ts index 7d69456..1917ce0 100644 --- a/src/listeners/commands/commandMissingPermissions.ts +++ b/src/listeners/commands/commandMissingPermissions.ts @@ -20,9 +20,9 @@ export default class CommandMissingPermissionsListener extends BushListener { | BushCommandHandlerEvents['missingPermissions'] | BushCommandHandlerEvents['slashMissingPermissions'] ): Promise<unknown> { - const niceMissing = missing.includes('ADMINISTRATOR') - ? ['ADMINISTRATOR'] - : missing.map((perm) => client.consts.mappings.permissions[perm]?.name ?? missing); + const niceMissing = (missing.includes('ADMINISTRATOR') ? (['ADMINISTRATOR'] as 'ADMINISTRATOR'[]) : missing).map( + (perm) => client.consts.mappings.permissions[perm]?.name ?? missing + ); const discordFormat = util.oxford(util.surroundArray(niceMissing, '**'), 'and', ''); const consoleFormat = util.oxford(util.surroundArray(niceMissing, '<<', '>>'), 'and', ''); |