diff options
Diffstat (limited to 'src')
111 files changed, 521 insertions, 158 deletions
diff --git a/src/commands/_fake-command/ironmoon.ts b/src/commands/_fake-command/ironmoon.ts index 500b384..8ca1f5b 100644 --- a/src/commands/_fake-command/ironmoon.ts +++ b/src/commands/_fake-command/ironmoon.ts @@ -8,13 +8,13 @@ export default class IronmoonCommand extends BushCommand { completelyHide: true }); } - public condition(message: BushMessage): boolean { + public override condition(message: BushMessage): boolean { return false; if (message.content.toLowerCase().includes('ironmoon')) return true; else return false; } - public async exec(message: BushMessage | BushSlashMessage): Promise<unknown> { + public override async exec(message: BushMessage | BushSlashMessage): Promise<unknown> { return await message.util.reply('Your message included the word ironmoon.'); } } diff --git a/src/commands/admin/channelPermissions.ts b/src/commands/admin/channelPermissions.ts index 851e2ed..a13f07a 100644 --- a/src/commands/admin/channelPermissions.ts +++ b/src/commands/admin/channelPermissions.ts @@ -50,7 +50,7 @@ export default class ChannelPermissionsCommand extends BushCommand { }); } - public async exec( + public override async exec( message: BushMessage, { target, diff --git a/src/commands/config/autoPublishChannel.ts b/src/commands/config/autoPublishChannel.ts index 8fa987b..3381dc2 100644 --- a/src/commands/config/autoPublishChannel.ts +++ b/src/commands/config/autoPublishChannel.ts @@ -38,7 +38,7 @@ export default class AutoPublishChannelCommand extends BushCommand { }); } - public async exec(message: BushMessage, { channel }: { channel: Channel }): Promise<unknown> { + public override async exec(message: BushMessage, { channel }: { channel: Channel }): Promise<unknown> { const autoPublishChannels = await message.guild.getSetting('autoPublishChannels'); const newValue = util.addOrRemoveFromArray( autoPublishChannels.includes(channel.id) ? 'remove' : 'add', diff --git a/src/commands/config/blacklist.ts b/src/commands/config/blacklist.ts index 150a1b7..78b0446 100644 --- a/src/commands/config/blacklist.ts +++ b/src/commands/config/blacklist.ts @@ -60,7 +60,7 @@ export default class BlacklistCommand extends BushCommand { }); } - public async exec( + public override async exec( message: BushMessage | BushSlashMessage, args: { action: 'blacklist' | 'unblacklist'; target: Channel | User | string; global: boolean } ): Promise<unknown> { diff --git a/src/commands/config/disable.ts b/src/commands/config/disable.ts index 5d2e4dd..a9318a5 100644 --- a/src/commands/config/disable.ts +++ b/src/commands/config/disable.ts @@ -59,7 +59,7 @@ export default class DisableCommand extends BushCommand { blacklistedCommands = ['eval', 'disable']; - public async exec( + public override async exec( message: BushMessage | BushSlashMessage, args: { action: 'enable' | 'disable'; command: BushCommand | string; global: boolean } ): Promise<unknown> { diff --git a/src/commands/config/muteRole.ts b/src/commands/config/muteRole.ts index b6e8a81..dee5322 100644 --- a/src/commands/config/muteRole.ts +++ b/src/commands/config/muteRole.ts @@ -37,7 +37,7 @@ export default class MuteRoleCommand extends BushCommand { }); } - async exec(message: BushMessage | BushSlashMessage, args: { role: Role }): Promise<void> { + override async exec(message: BushMessage | BushSlashMessage, args: { role: Role }): Promise<void> { await message.guild.setSetting('muteRole', args.role.id); await message.util.send({ content: `${util.emojis.success} Changed the server's mute role to <@&${args.role.id}>.`, diff --git a/src/commands/config/prefix.ts b/src/commands/config/prefix.ts index 9c1ce92..9f80633 100644 --- a/src/commands/config/prefix.ts +++ b/src/commands/config/prefix.ts @@ -36,7 +36,7 @@ export default class PrefixCommand extends BushCommand { }); } - async exec(message: BushMessage | BushSlashMessage, args: { prefix?: string }): Promise<unknown> { + override async exec(message: BushMessage | BushSlashMessage, args: { prefix?: string }): Promise<unknown> { const oldPrefix = await message.guild.getSetting('prefix'); await message.guild.setSetting('prefix', args.prefix ?? client.config.prefix); if (args.prefix) { diff --git a/src/commands/config/punishmentFooter.ts b/src/commands/config/punishmentFooter.ts index eeac6c1..d8daf77 100644 --- a/src/commands/config/punishmentFooter.ts +++ b/src/commands/config/punishmentFooter.ts @@ -38,7 +38,7 @@ export default class PunishmentFooterCommand extends BushCommand { }); } - async exec(message: BushMessage | BushSlashMessage, args: { ending: string }): Promise<unknown> { + override async exec(message: BushMessage | BushSlashMessage, args: { ending: string }): Promise<unknown> { await message.guild.setSetting('punishmentEnding', args.ending || null); if (args.ending) return await message.util.send({ diff --git a/src/commands/config/welcomeChannel.ts b/src/commands/config/welcomeChannel.ts index 3db9e74..a662802 100644 --- a/src/commands/config/welcomeChannel.ts +++ b/src/commands/config/welcomeChannel.ts @@ -36,7 +36,7 @@ export default class WelcomeChannelCommand extends BushCommand { userPermissions: ['SEND_MESSAGES', 'MANAGE_GUILD'] }); } - public async exec(message: BushMessage | BushSlashMessage, args: { channel: Channel }): Promise<unknown> { + public override async exec(message: BushMessage | BushSlashMessage, args: { channel: Channel }): Promise<unknown> { const oldChannel = await message.guild.getSetting('welcomeChannel'); await message.guild.setSetting('welcomeChannel', args.channel.id ?? undefined); if (args.channel) { diff --git a/src/commands/dev/__template.ts b/src/commands/dev/__template.ts index 35c57db..949e04e 100644 --- a/src/commands/dev/__template.ts +++ b/src/commands/dev/__template.ts @@ -55,7 +55,7 @@ export default class TemplateCommand extends BushCommand { userPermissions: ['SEND_MESSAGES'] }); } - public async exec(message: BushMessage | BushSlashMessage): Promise<unknown> { + public override async exec(message: BushMessage | BushSlashMessage): Promise<unknown> { return await message.util.reply(`${util.emojis.error} Do not use the template command.`); } } diff --git a/src/commands/dev/_testDB.ts b/src/commands/dev/_testDB.ts new file mode 100644 index 0000000..e1fddb4 --- /dev/null +++ b/src/commands/dev/_testDB.ts @@ -0,0 +1,25 @@ +// import { BushCommand, BushSlashMessage, Global } from '@lib'; +// import { Message } from 'discord.js'; +// import { inspect } from 'util'; |
