diff options
Diffstat (limited to 'src/commands')
69 files changed, 126 insertions, 127 deletions
diff --git a/src/commands/_fake-command/ironmoon.ts b/src/commands/_fake-command/ironmoon.ts index 612db85..dc34ab6 100644 --- a/src/commands/_fake-command/ironmoon.ts +++ b/src/commands/_fake-command/ironmoon.ts @@ -1,4 +1,4 @@ -import { BushCommand, BushMessage, BushSlashMessage } from '@lib'; +import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; export default class IronmoonCommand extends BushCommand { public constructor() { diff --git a/src/commands/admin/channelPermissions.ts b/src/commands/admin/channelPermissions.ts index dc35c87..3b0b5f1 100644 --- a/src/commands/admin/channelPermissions.ts +++ b/src/commands/admin/channelPermissions.ts @@ -1,5 +1,5 @@ -import { BushCommand, BushMessage, BushSlashMessage, ButtonPaginator } from '@lib'; -import { GuildMember, MessageEmbed, PermissionString, Role } from 'discord.js'; +import { BushCommand, ButtonPaginator, type BushMessage, type BushSlashMessage } from '@lib'; +import { MessageEmbed, type GuildMember, type PermissionString, type Role } from 'discord.js'; export default class ChannelPermissionsCommand extends BushCommand { public constructor() { diff --git a/src/commands/admin/roleAll.ts b/src/commands/admin/roleAll.ts index 1e67874..a9db11d 100644 --- a/src/commands/admin/roleAll.ts +++ b/src/commands/admin/roleAll.ts @@ -1,5 +1,5 @@ -import { AllowedMentions, BushCommand, BushMessage, BushSlashMessage } from '@lib'; -import { GuildMember, Role } from 'discord.js'; +import { AllowedMentions, BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; +import { type GuildMember, type Role } from 'discord.js'; export default class RoleAllCommand extends BushCommand { public constructor() { diff --git a/src/commands/config/blacklist.ts b/src/commands/config/blacklist.ts index c928265..bac3ef3 100644 --- a/src/commands/config/blacklist.ts +++ b/src/commands/config/blacklist.ts @@ -1,6 +1,5 @@ -import { AllowedMentions, BushCommand, BushMessage, BushSlashMessage, Global } from '@lib'; -import { Argument } from 'discord-akairo'; -import { Channel, User } from 'discord.js'; +import { AllowedMentions, BushCommand, Global, type BushMessage, type BushSlashMessage } from '@lib'; +import { User, type Channel } from 'discord.js'; export default class BlacklistCommand extends BushCommand { public constructor() { @@ -15,7 +14,7 @@ export default class BlacklistCommand extends BushCommand { args: [ { id: 'target', - customType: Argument.union('channel', 'user'), + customType: util.arg.union('channel', 'user'), prompt: { start: 'What channel or user that you would like to blacklist/unblacklist?', retry: '{error} Pick a valid user or channel.' diff --git a/src/commands/config/config.ts b/src/commands/config/config.ts index 3342456..555b47d 100644 --- a/src/commands/config/config.ts +++ b/src/commands/config/config.ts @@ -1,19 +1,19 @@ -import { BushCommand, BushMessage, BushSlashMessage, GuildSettings, guildSettingsObj, settingsArr } from '@lib'; -import { ArgumentOptions, Flag } from 'discord-akairo'; +import { BushCommand, guildSettingsObj, settingsArr, type BushMessage, type BushSlashMessage, type GuildSettings } from '@lib'; +import { type ArgumentOptions, type Flag } from 'discord-akairo'; import { Channel, Formatters, GuildMember, - Message, MessageActionRow, MessageButton, - MessageComponentInteraction, MessageEmbed, - MessageOptions, MessageSelectMenu, Role, - Snowflake, - User + User, + type Message, + type MessageComponentInteraction, + type MessageOptions, + type Snowflake } from 'discord.js'; import _ from 'lodash'; diff --git a/src/commands/config/customAutomodPhrases.ts b/src/commands/config/customAutomodPhrases.ts index 6bed8fd..25201ff 100644 --- a/src/commands/config/customAutomodPhrases.ts +++ b/src/commands/config/customAutomodPhrases.ts @@ -1,4 +1,4 @@ -// import { BushCommand, BushMessage, BushSlashMessage } from '@lib'; +// import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; // export default class CustomAutomodPhrasesCommand extends BushCommand { // public constructor() { diff --git a/src/commands/config/disable.ts b/src/commands/config/disable.ts index 521972b..3ada74e 100644 --- a/src/commands/config/disable.ts +++ b/src/commands/config/disable.ts @@ -1,4 +1,4 @@ -import { AllowedMentions, BushCommand, BushMessage, BushSlashMessage, Global } from '@lib'; +import { AllowedMentions, BushCommand, Global, type BushMessage, type BushSlashMessage } from '@lib'; export default class DisableCommand extends BushCommand { public constructor() { diff --git a/src/commands/config/features.ts b/src/commands/config/features.ts index 8285845..065253c 100644 --- a/src/commands/config/features.ts +++ b/src/commands/config/features.ts @@ -1,5 +1,5 @@ -import { BushCommand, BushMessage, BushSlashMessage, GuildFeatures, guildFeaturesArr, guildFeaturesObj } from '@lib'; -import { Message, MessageActionRow, MessageEmbed, MessageSelectMenu, SelectMenuInteraction } from 'discord.js'; +import { BushCommand, guildFeaturesArr, guildFeaturesObj, type BushMessage, type BushSlashMessage, type GuildFeatures } from '@lib'; +import { MessageActionRow, MessageEmbed, MessageSelectMenu, type Message, type SelectMenuInteraction } from 'discord.js'; export default class FeaturesCommand extends BushCommand { public constructor() { diff --git a/src/commands/config/levelRoles.ts b/src/commands/config/levelRoles.ts index c8f0bf3..e788615 100644 --- a/src/commands/config/levelRoles.ts +++ b/src/commands/config/levelRoles.ts @@ -1,4 +1,4 @@ -// import { BushCommand, BushMessage, BushSlashMessage } from '@lib'; +// import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; // export default class LevelRolesCommand extends BushCommand { // public constructor() { diff --git a/src/commands/config/log.ts b/src/commands/config/log.ts index c364a35..af68483 100644 --- a/src/commands/config/log.ts +++ b/src/commands/config/log.ts @@ -1,6 +1,6 @@ -import { BushCommand, BushMessage, BushSlashMessage, guildLogsArr, GuildLogType } from '@lib'; -import { ArgumentOptions, Flag } from 'discord-akairo'; -import { TextChannel } from 'discord.js'; +import { BushCommand, guildLogsArr, type BushMessage, type BushSlashMessage, type GuildLogType } from '@lib'; +import { type ArgumentOptions, type Flag } from 'discord-akairo'; +import { type TextChannel } from 'discord.js'; export default class LogCommand extends BushCommand { public constructor() { diff --git a/src/commands/dev/__template.ts b/src/commands/dev/__template.ts index 0d25766..85cc06e 100644 --- a/src/commands/dev/__template.ts +++ b/src/commands/dev/__template.ts @@ -1,4 +1,4 @@ -import { BushCommand, BushMessage, BushSlashMessage } from '@lib'; +import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; export default class TemplateCommand extends BushCommand { public constructor() { diff --git a/src/commands/dev/eval.ts b/src/commands/dev/eval.ts index 5bb99e7..e22f937 100644 --- a/src/commands/dev/eval.ts +++ b/src/commands/dev/eval.ts @@ -1,4 +1,4 @@ -import { BushCommand, BushMessage, BushSlashMessage } from '@lib'; +import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; import { exec } from 'child_process'; import { MessageEmbed as _MessageEmbed } from 'discord.js'; import { transpile } from 'typescript'; diff --git a/src/commands/dev/reload.ts b/src/commands/dev/reload.ts index a95106f..7920a37 100644 --- a/src/commands/dev/reload.ts +++ b/src/commands/dev/reload.ts @@ -1,4 +1,4 @@ -import { BushCommand, BushMessage, BushSlashMessage } from '@lib'; +import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; export default class ReloadCommand extends BushCommand { public constructor() { diff --git a/src/commands/dev/say.ts b/src/commands/dev/say.ts index 947f3c2..3a8b2de 100644 --- a/src/commands/dev/say.ts +++ b/src/commands/dev/say.ts @@ -1,5 +1,4 @@ -import { AllowedMentions, BushCommand, BushMessage } from '@lib'; -import { AkairoMessage } from 'discord-akairo'; +import { AllowedMentions, BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; export default class SayCommand extends BushCommand { public constructor() { @@ -35,7 +34,7 @@ export default class SayCommand extends BushCommand { await message.util.send({ content: args.content, allowedMentions: AllowedMentions.none() }).catch(() => null); } - public override async execSlash(message: AkairoMessage, args: { content: string }) { + public override async execSlash(message: BushSlashMessage, args: { content: string }) { if (!client.config.owners.includes(message.author.id)) { return await message.interaction.reply({ content: `${util.emojis.error} Only my developers can run this command.`, diff --git a/src/commands/dev/servers.ts b/src/commands/dev/servers.ts index e26d2c7..4b98ed9 100644 --- a/src/commands/dev/servers.ts +++ b/src/commands/dev/servers.ts @@ -1,5 +1,5 @@ -import { BushCommand, BushMessage, BushSlashMessage, ButtonPaginator } from '@lib'; -import { Guild, MessageEmbedOptions } from 'discord.js'; +import { BushCommand, ButtonPaginator, type BushMessage, type BushSlashMessage } from '@lib'; +import { type Guild, type MessageEmbedOptions } from 'discord.js'; export default class ServersCommand extends BushCommand { public constructor() { diff --git a/src/commands/dev/sh.ts b/src/commands/dev/sh.ts index 11cd28d..e32408d 100644 --- a/src/commands/dev/sh.ts +++ b/src/commands/dev/sh.ts @@ -1,4 +1,4 @@ -import { BushCommand, BushMessage, BushSlashMessage } from '@lib'; +import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; import chalk from 'chalk'; import { exec } from 'child_process'; import { MessageEmbed, Util } from 'discord.js'; diff --git a/src/commands/dev/superUser.ts b/src/commands/dev/superUser.ts index 147a6c4..41cd7eb 100644 --- a/src/commands/dev/superUser.ts +++ b/src/commands/dev/superUser.ts @@ -1,6 +1,6 @@ -import { BushCommand, BushMessage, BushSlashMessage, Global } from '@lib'; -import { ArgumentOptions, Flag } from 'discord-akairo'; -import { User } from 'discord.js'; +import { BushCommand, Global, type BushMessage, type BushSlashMessage } from '@lib'; +import { type ArgumentOptions, type Flag } from 'discord-akairo'; +import { type User } from 'discord.js'; export default class SuperUserCommand extends BushCommand { public constructor() { diff --git a/src/commands/dev/test.ts b/src/commands/dev/test.ts index 8ea57f9..d6c20f7 100644 --- a/src/commands/dev/test.ts +++ b/src/commands/dev/test.ts @@ -1,11 +1,11 @@ -import { BushCommand, BushMessage, ButtonPaginator } from '@lib'; +import { BushCommand, ButtonPaginator, type BushMessage } from '@lib'; import { - ApplicationCommand, - Collection, Constants as jsConstants, MessageActionRow, MessageButton, - MessageEmbed + MessageEmbed, + type ApplicationCommand, + type Collection } from 'discord.js'; export default class TestCommand extends BushCommand { diff --git a/src/commands/fun/coinflip.ts b/src/commands/fun/coinflip.ts index 2d1f70c..ef55518 100644 --- a/src/commands/fun/coinflip.ts +++ b/src/commands/fun/coinflip.ts @@ -1,4 +1,4 @@ -import { BushCommand, BushMessage, BushSlashMessage } from '@lib'; +import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; export default class CoinFlipCommand extends BushCommand { public constructor() { diff --git a/src/commands/fun/dice.ts b/src/commands/fun/dice.ts index 5058617..fef5c7a 100644 --- a/src/commands/fun/dice.ts +++ b/src/commands/fun/dice.ts @@ -1,4 +1,4 @@ -import { BushCommand, BushMessage, BushSlashMessage } from '@lib'; +import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; export default class EightBallCommand extends BushCommand { public constructor() { diff --git a/src/commands/fun/eightBall.ts b/src/commands/fun/eightBall.ts index e96e006..2555fdb 100644 --- a/src/commands/fun/eightBall.ts +++ b/src/commands/fun/eightBall.ts @@ -1,4 +1,4 @@ -import { BushCommand, BushMessage, BushSlashMessage } from '@lib'; +import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; export default class EightBallCommand extends BushCommand { public constructor() { diff --git a/src/commands/fun/minesweeper.ts b/src/commands/fun/minesweeper.ts index c9b0a8c..6c6d4f4 100644 --- a/src/commands/fun/minesweeper.ts +++ b/src/commands/fun/minesweeper.ts @@ -1,4 +1,4 @@ -import { BushCommand, BushMessage, BushSlashMessage } from '@lib'; +import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; import Minesweeper from 'discord.js-minesweeper'; export default class MinesweeperCommand extends BushCommand { diff --git a/src/commands/info/avatar.ts b/src/commands/info/avatar.ts index 44e1556..10994d9 100644 --- a/src/commands/info/avatar.ts +++ b/src/commands/info/avatar.ts @@ -1,5 +1,5 @@ -import { BushCommand, BushMessage, BushSlashMessage } from '@lib'; -import { GuildMember, MessageEmbed, User } from 'discord.js'; +import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; +import { GuildMember, MessageEmbed, type User } from 'discord.js'; export default class AvatarCommand extends BushCommand { constructor() { diff --git a/src/commands/info/botInfo.ts b/src/commands/info/botInfo.ts index a072224..d5f37e8 100644 --- a/src/commands/info/botInfo.ts +++ b/src/commands/info/botInfo.ts @@ -1,4 +1,4 @@ -import { BushCommand, BushMessage, BushSlashMessage } from '@lib'; +import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; import { MessageEmbed, version as discordJSVersion } from 'discord.js'; import * as os from 'os'; import prettyBytes from 'pretty-bytes'; diff --git a/src/commands/info/color.ts b/src/commands/info/color.ts index 021f319..5c3f14c 100644 --- a/src/commands/info/color.ts +++ b/src/commands/info/color.ts @@ -1,7 +1,7 @@ -import { AllowedMentions, BushCommand, BushGuildMember, BushMessage, BushRole, BushSlashMessage } from '@lib'; +import { AllowedMentions, BushCommand, type BushGuildMember, type BushMessage, type BushRole, type BushSlashMessage } from '@lib'; import { Argument } from 'discord-akairo'; -import { Message, MessageEmbed, Role } from 'discord.js'; -import tinycolor from 'tinycolor2'; // this is the only way I got it to work consistently +import { MessageEmbed, Role, type Message } from 'discord.js'; +import tinycolor from 'tinycolor2'; const isValidTinyColor = (_message: Message, phase: string) => { // if the phase is a number it converts it to hex incase it could be representing a color in decimal @@ -37,7 +37,7 @@ export default class ColorCommand extends BushCommand { } public removePrefixAndParenthesis(color: string): string { - return color.substr(4, color.length - 5); + return color.substring(4, color.length - 5); } public override async exec(message: BushMessage | BushSlashMessage, args: { color: string | BushRole | BushGuildMember }) { diff --git a/src/commands/info/guildInfo.ts b/src/commands/info/guildInfo.ts index 51d9984..3c287dd 100644 --- a/src/commands/info/guildInfo.ts +++ b/src/commands/info/guildInfo.ts @@ -1,5 +1,5 @@ -import { BushCommand, BushMessage, BushSlashMessage } from '@lib'; -import { BaseGuildVoiceChannel, Guild, GuildPreview, MessageEmbed, Snowflake, Vanity } from 'discord.js'; +import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; +import { Guild, MessageEmbed, type BaseGuildVoiceChannel, type GuildPreview, type Snowflake, type Vanity } from 'discord.js'; export default class GuildInfoCommand extends BushCommand { public constructor() { diff --git a/src/commands/info/help.ts b/src/commands/info/help.ts index c814adb..e22aa5d 100644 --- a/src/commands/info/help.ts +++ b/src/commands/info/help.ts @@ -1,6 +1,7 @@ import { BushCommand, BushMessage, BushSlashMessage } from '@lib'; import { MessageActionRow, MessageButton, MessageEmbed } from 'discord.js'; import packageDotJSON from '../../../package.json'; + export default class HelpCommand extends BushCommand { public constructor() { super('help', { diff --git a/src/commands/info/icon.ts b/src/commands/info/icon.ts index 0eb7bfc..b9cc4e0 100644 --- a/src/commands/info/icon.ts +++ b/src/commands/info/icon.ts @@ -1,4 +1,4 @@ -import { BushCommand, BushMessage, BushSlashMessage } from '@lib'; +import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; import { MessageEmbed } from 'discord.js'; export default class IconCommand extends BushCommand { diff --git a/src/commands/info/links.ts b/src/commands/info/links.ts index 7b52fef..d4bcff0 100644 --- a/src/commands/info/links.ts +++ b/src/commands/info/links.ts @@ -1,4 +1,4 @@ -import { BushCommand, BushMessage, BushSlashMessage } from '@lib'; +import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; import { MessageActionRow, MessageButton } from 'discord.js'; import packageDotJSON from '../../../package.json'; diff --git a/src/commands/info/ping.ts b/src/commands/info/ping.ts index 8d05307..831eeb7 100644 --- a/src/commands/info/ping.ts +++ b/< |
