From aa4cb7e51823f7a2c884c17a8d1010217cce301b Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Thu, 30 Sep 2021 19:12:48 -0400 Subject: convert multiword commands to use '-' as a word separator --- src/commands/admin/channelPermissions.ts | 2 +- src/commands/admin/roleAll.ts | 2 +- src/commands/config/customAutomodPhrases.ts | 6 +++--- src/commands/config/levelRoles.ts | 6 +++--- src/commands/dev/reload.ts | 11 ++++++++--- src/commands/leveling/setLevel.ts | 8 ++++---- src/commands/leveling/setXp.ts | 6 +++--- src/commands/moderation/ban.ts | 2 +- src/commands/moderation/hideCase.ts | 2 +- src/commands/moderation/removeReactionEmoji.ts | 6 +++--- src/commands/moulberry-bush/capePerms.ts | 8 ++++---- src/commands/moulberry-bush/giveawayPing.ts | 8 ++++---- src/commands/moulberry-bush/moulHammer.ts | 2 +- src/commands/moulberry-bush/serverStatus.ts | 4 ++-- src/commands/utilities/steal.ts | 2 +- src/commands/utilities/whoHasRole.ts | 4 ++-- src/commands/utilities/wolframAlpha.ts | 6 +++--- src/lib/extensions/discord-akairo/BushClient.ts | 3 ++- 18 files changed, 47 insertions(+), 41 deletions(-) (limited to 'src') diff --git a/src/commands/admin/channelPermissions.ts b/src/commands/admin/channelPermissions.ts index 993e811..f313a8f 100644 --- a/src/commands/admin/channelPermissions.ts +++ b/src/commands/admin/channelPermissions.ts @@ -4,7 +4,7 @@ import { BushCommand, BushMessage } from '../../lib'; export default class ChannelPermissionsCommand extends BushCommand { public constructor() { super('channelPermissions', { - aliases: ['channelperms', 'cperms', 'cperm', 'chanperms', 'chanperm', 'channelpermissions'], + aliases: ['channel-perms', 'cperms', 'cperm', 'chanperms', 'chanperm', 'channel-permissions'], category: 'admin', typing: true, description: { diff --git a/src/commands/admin/roleAll.ts b/src/commands/admin/roleAll.ts index ca82ca8..d965239 100644 --- a/src/commands/admin/roleAll.ts +++ b/src/commands/admin/roleAll.ts @@ -4,7 +4,7 @@ import { AllowedMentions, BushCommand, BushMessage } from '../../lib'; export default class RoleAllCommand extends BushCommand { public constructor() { super('roleAll', { - aliases: ['roleall', 'rall'], + aliases: ['role-all', 'rall'], category: 'admin', description: { content: 'Give a role to every member on the server.', diff --git a/src/commands/config/customAutomodPhrases.ts b/src/commands/config/customAutomodPhrases.ts index 7735939..2cbe874 100644 --- a/src/commands/config/customAutomodPhrases.ts +++ b/src/commands/config/customAutomodPhrases.ts @@ -3,12 +3,12 @@ // export default class CustomAutomodPhrasesCommand extends BushCommand { // public constructor() { // super('customAutomodPhrases', { -// aliases: ['customautomodphrases'], +// aliases: ['custom-automod-phrases'], // category: 'config', // description: { // content: 'Configure additional phrases to be used for automod.', -// usage: 'customautomodphrases [optionalArg]', -// examples: ['template 1 2'] +// usage: 'custom-automod-phrases [optionalArg]', +// examples: ['custom-automod-phrases 1 2'] // }, // args: [ // { diff --git a/src/commands/config/levelRoles.ts b/src/commands/config/levelRoles.ts index d27c7a0..f947d85 100644 --- a/src/commands/config/levelRoles.ts +++ b/src/commands/config/levelRoles.ts @@ -3,12 +3,12 @@ // export default class LevelRolesCommand extends BushCommand { // public constructor() { // super('levelRole', { -// aliases: ['levelrole', 'levelroles', 'lr'], +// aliases: ['level-role', 'level-roles', 'lr'], // category: 'config', // description: { // content: 'Command description.', -// usage: 'levelrole ', -// examples: ['levelrole 1 2'] +// usage: 'level-role ', +// examples: ['level-role 1 2'] // }, // args: [ // { diff --git a/src/commands/dev/reload.ts b/src/commands/dev/reload.ts index f7afbca..987cd01 100644 --- a/src/commands/dev/reload.ts +++ b/src/commands/dev/reload.ts @@ -39,9 +39,14 @@ export default class ReloadCommand extends BushCommand { try { const s = new Date(); output = await util.shell(`yarn build-${/* fast ? 'esbuild' : */ 'tsc'}`); - client.commandHandler.reloadAll(); - client.listenerHandler.reloadAll(); - client.inhibitorHandler.reloadAll(); + await Promise.all([ + client.commandHandler.reloadAll(), + client.listenerHandler.reloadAll(), + client.inhibitorHandler.reloadAll(), + client.contextMenuCommandHandler.reloadAll(), + client.taskHandler.reloadAll() + ]); + return message.util.send(`🔁 Successfully reloaded! (${new Date().getTime() - s.getTime()}ms)`); } catch (e) { if (output!) void client.logger.error('reloadCommand', output); diff --git a/src/commands/leveling/setLevel.ts b/src/commands/leveling/setLevel.ts index 1869773..b98b488 100644 --- a/src/commands/leveling/setLevel.ts +++ b/src/commands/leveling/setLevel.ts @@ -3,13 +3,13 @@ import { User } from 'discord.js'; export default class SetLevelCommand extends BushCommand { public constructor() { - super('setlevel', { - aliases: ['setlevel'], + super('setLevel', { + aliases: ['set-level'], category: 'leveling', description: { content: 'Sets the level of a user', - usage: 'setlevel ', - examples: ['setlevel @Moulberry 69'] //nice + usage: 'set-level ', + examples: ['set-level @Moulberry 69'] //nice }, args: [ { diff --git a/src/commands/leveling/setXp.ts b/src/commands/leveling/setXp.ts index 8be3a10..3e00ea2 100644 --- a/src/commands/leveling/setXp.ts +++ b/src/commands/leveling/setXp.ts @@ -4,12 +4,12 @@ import { User } from 'discord.js'; export default class SetXpCommand extends BushCommand { public constructor() { super('setXp', { - aliases: ['setxp'], + aliases: ['set-xp'], category: 'leveling', description: { content: 'Sets the xp of a user', - usage: 'setlevel ', - examples: ['setlevel @Moulberry 69k'] //nice + usage: 'set-xp ', + examples: ['set-xp @Moulberry 69k'] //nice }, args: [ { diff --git a/src/commands/moderation/ban.ts b/src/commands/moderation/ban.ts index 88ad8e4..b64330f 100644 --- a/src/commands/moderation/ban.ts +++ b/src/commands/moderation/ban.ts @@ -4,7 +4,7 @@ import { Snowflake, User } from 'discord.js'; export default class BanCommand extends BushCommand { public constructor() { super('ban', { - aliases: ['ban', 'forceban', 'dban'], + aliases: ['ban', 'force-ban', 'dban'], category: 'moderation', description: { content: 'Ban a member from the server.', diff --git a/src/commands/moderation/hideCase.ts b/src/commands/moderation/hideCase.ts index cf7b4de..2ed788a 100644 --- a/src/commands/moderation/hideCase.ts +++ b/src/commands/moderation/hideCase.ts @@ -3,7 +3,7 @@ import { BushCommand, BushMessage, BushSlashMessage, ModLog } from '@lib'; export default class HideCaseCommand extends BushCommand { public constructor() { super('hideCase', { - aliases: ['hidecase', 'hide_case', 'showcase', 'show_case', 'coverupmodabuse', 'cover_up_mod_abuse'], + aliases: ['hide-case', 'hide_case', 'showcase', 'show_case', 'cover-up-mod-abuse', 'cover_up_mod_abuse'], category: 'moderation', description: { content: 'Hide a particular modlog case from the modlog command unless the `--hidden` flag is specified', diff --git a/src/commands/moderation/removeReactionEmoji.ts b/src/commands/moderation/removeReactionEmoji.ts index d4c0cb6..dc05883 100644 --- a/src/commands/moderation/removeReactionEmoji.ts +++ b/src/commands/moderation/removeReactionEmoji.ts @@ -4,12 +4,12 @@ import { Emoji, Snowflake } from 'discord.js'; export default class RemoveReactionEmojiCommand extends BushCommand { public constructor() { super('removeReactionEmoji', { - aliases: ['removereactionemoji', 'rre'], + aliases: ['remove-reaction-emoji', 'rre'], category: 'moderation', description: { content: 'Deleted all the reactions of a certain emoji from a message.', - usage: 'removereactionemoji ', - examples: ['removereactionemoji 791413052347252786 <:omegaclown:782630946435366942>'] + usage: 'remove-reaction-emoji ', + examples: ['remove-reaction-emoji 791413052347252786 <:omegaclown:782630946435366942>'] }, clientPermissions: ['MANAGE_MESSAGES', 'SEND_MESSAGES', 'EMBED_LINKS'], userPermissions: ['MANAGE_MESSAGES', 'MANAGE_EMOJIS_AND_STICKERS'], // Can't undo the removal of 1000s of reactions diff --git a/src/commands/moulberry-bush/capePerms.ts b/src/commands/moulberry-bush/capePerms.ts index 2481e3e..978d8e5 100644 --- a/src/commands/moulberry-bush/capePerms.ts +++ b/src/commands/moulberry-bush/capePerms.ts @@ -4,13 +4,13 @@ import got from 'got'; export default class CapePermissionsCommand extends BushCommand { public constructor() { - super('capepermissions', { - aliases: ['capeperms', 'capeperm', 'capepermissions'], + super('capePermissions', { + aliases: ['cape-perms', 'cape-perm', 'cape-permissions'], category: "Moulberry's Bush", description: { content: 'A command to see what capes someone has access to.', - usage: 'capeperms ', - examples: ['capeperms IRONM00N'] + usage: 'cape-perms ', + examples: ['cape-perms IRONM00N'] }, args: [ { diff --git a/src/commands/moulberry-bush/giveawayPing.ts b/src/commands/moulberry-bush/giveawayPing.ts index 4b96e07..18f4acf 100644 --- a/src/commands/moulberry-bush/giveawayPing.ts +++ b/src/commands/moulberry-bush/giveawayPing.ts @@ -2,13 +2,13 @@ import { AllowedMentions, BushCommand, BushMessage } from '@lib'; export default class GiveawayPingCommand extends BushCommand { public constructor() { - super('giveawayping', { - aliases: ['giveawayping', 'giveawaypong'], + super('giveawayPing', { + aliases: ['giveaway-ping', 'giveaway-pong'], category: "Moulberry's Bush", description: { content: 'Pings the giveaway role.', - usage: 'giveawayping', - examples: ['giveawayping'] + usage: 'giveaway-ping', + examples: ['giveaway-ping'] }, clientPermissions: ['MANAGE_MESSAGES'], userPermissions: ['SEND_MESSAGES', 'MANAGE_GUILD', 'MANAGE_MESSAGES', 'BAN_MEMBERS', 'KICK_MEMBERS', 'VIEW_CHANNEL'], diff --git a/src/commands/moulberry-bush/moulHammer.ts b/src/commands/moulberry-bush/moulHammer.ts index 8e78031..d5930b5 100644 --- a/src/commands/moulberry-bush/moulHammer.ts +++ b/src/commands/moulberry-bush/moulHammer.ts @@ -4,7 +4,7 @@ import { BushCommand, BushMessage } from '../../lib'; export default class MoulHammerCommand extends BushCommand { public constructor() { super('moulHammer', { - aliases: ['moulhammer'], + aliases: ['moul-hammer'], category: "Moulberry's Bush", description: { content: 'A command to moul hammer members.', diff --git a/src/commands/moulberry-bush/serverStatus.ts b/src/commands/moulberry-bush/serverStatus.ts index 004329d..8ff9803 100644 --- a/src/commands/moulberry-bush/serverStatus.ts +++ b/src/commands/moulberry-bush/serverStatus.ts @@ -4,8 +4,8 @@ import { BushCommand, BushMessage } from '../../lib'; export default class ServerStatusCommand extends BushCommand { public constructor() { - super('serverstatus', { - aliases: ['serverstatus', 'ss'], + super('serverStatus', { + aliases: ['server-status', 'ss'], category: "Moulberry's Bush", description: { usage: 'serverstatus', diff --git a/src/commands/utilities/steal.ts b/src/commands/utilities/steal.ts index 01c39ea..7d61016 100644 --- a/src/commands/utilities/steal.ts +++ b/src/commands/utilities/steal.ts @@ -4,7 +4,7 @@ import { Snowflake } from 'discord-api-types'; export default class StealCommand extends BushCommand { public constructor() { super('steal', { - aliases: ['steal', 'copyemoji'], + aliases: ['steal', 'copy-emoji'], category: 'utilities', description: { content: 'Steal an emoji from another server and add it to your own.', diff --git a/src/commands/utilities/whoHasRole.ts b/src/commands/utilities/whoHasRole.ts index f096cee..1b72d65 100644 --- a/src/commands/utilities/whoHasRole.ts +++ b/src/commands/utilities/whoHasRole.ts @@ -3,8 +3,8 @@ import { CommandInteraction, Role, Util } from 'discord.js'; export default class WhoHasRoleCommand extends BushCommand { public constructor() { - super('whohasrole', { - aliases: ['whohasrole', 'whr', 'dump'], + super('whoHasRole', { + aliases: ['who-has-role', 'whr', 'dump'], category: 'utilities', description: { content: 'Allows you to view what users have a certain role.', diff --git a/src/commands/utilities/wolframAlpha.ts b/src/commands/utilities/wolframAlpha.ts index 88dc65a..69e2ff4 100644 --- a/src/commands/utilities/wolframAlpha.ts +++ b/src/commands/utilities/wolframAlpha.ts @@ -6,12 +6,12 @@ import WolframAlphaAPI from 'wolfram-alpha-api'; export default class WolframAlphaCommand extends BushCommand { public constructor() { super('wolframAlpha', { - aliases: ['wolframalpha', 'wolfram', 'alpha', 'wolf', 'wa'], + aliases: ['wolfram-alpha', 'wolfram', 'alpha', 'wolf', 'wa'], category: 'utilities', description: { content: 'Queries Wolfram|Alpha for a result.', - usage: 'wolframalpha ', - examples: ['wolframalpha what is the population of france'] + usage: 'wolfram-alpha ', + examples: ['wolfram-alpha what is the population of france'] }, args: [ { diff --git a/src/lib/extensions/discord-akairo/BushClient.ts b/src/lib/extensions/discord-akairo/BushClient.ts index 1ac0ee9..065d141 100644 --- a/src/lib/extensions/discord-akairo/BushClient.ts +++ b/src/lib/extensions/discord-akairo/BushClient.ts @@ -275,7 +275,8 @@ export class BushClient extends AkairoClient