From c40a94697d64962edda41345e03fa76f51aa431c Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Sun, 31 Oct 2021 22:38:06 -0400 Subject: upgrade typescript, improve workflow, bunch of bug fixes and some other things --- src/commands/info/avatar.ts | 4 ++-- src/commands/info/botInfo.ts | 2 +- src/commands/info/color.ts | 8 ++++---- src/commands/info/guildInfo.ts | 4 ++-- src/commands/info/help.ts | 1 + src/commands/info/icon.ts | 2 +- src/commands/info/links.ts | 2 +- src/commands/info/ping.ts | 4 ++-- src/commands/info/pronouns.ts | 4 ++-- src/commands/info/snowflake.ts | 28 ++++++++++++++-------------- src/commands/info/userInfo.ts | 4 ++-- 11 files changed, 32 insertions(+), 31 deletions(-) (limited to 'src/commands/info') 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/src/commands/info/ping.ts @@ -1,5 +1,5 @@ -import { BushCommand, BushMessage, BushSlashMessage } from '@lib'; -import { Message, MessageEmbed } from 'discord.js'; +import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; +import { MessageEmbed, type Message } from 'discord.js'; export default class PingCommand extends BushCommand { public constructor() { diff --git a/src/commands/info/pronouns.ts b/src/commands/info/pronouns.ts index 132b719..390d1bb 100644 --- a/src/commands/info/pronouns.ts +++ b/src/commands/info/pronouns.ts @@ -1,5 +1,5 @@ -import { BushCommand, BushMessage, BushSlashMessage } from '@lib'; -import { MessageEmbed, User } from 'discord.js'; +import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; +import { MessageEmbed, type User } from 'discord.js'; export default class PronounsCommand extends BushCommand { public constructor() { diff --git a/src/commands/info/snowflake.ts b/src/commands/info/snowflake.ts index 2b75b30..2b3c816 100644 --- a/src/commands/info/snowflake.ts +++ b/src/commands/info/snowflake.ts @@ -1,20 +1,20 @@ -import { BushCommand, BushMessage, BushSlashMessage } from '@lib'; +import { BushCommand, type BushMessage, type BushSlashMessage } from '@lib'; import { - CategoryChannel, - Channel, - DeconstructedSnowflake, - DMChannel, - Emoji, - Guild, MessageEmbed, - NewsChannel, - Role, - Snowflake, SnowflakeUtil, - StageChannel, - TextChannel, - User, - VoiceChannel + VoiceChannel, + type CategoryChannel, + type Channel, + type DeconstructedSnowflake, + type DMChannel, + type Emoji, + type Guild, + type NewsChannel, + type Role, + type Snowflake, + type StageChannel, + type TextChannel, + type User } from 'discord.js'; export default class SnowflakeCommand extends BushCommand { diff --git a/src/commands/info/userInfo.ts b/src/commands/info/userInfo.ts index 7969875..fe4fd85 100644 --- a/src/commands/info/userInfo.ts +++ b/src/commands/info/userInfo.ts @@ -1,5 +1,5 @@ -import { BushCommand, BushMessage, BushSlashMessage, BushUser } from '@lib'; -import { MessageEmbed, Snowflake } from 'discord.js'; +import { BushCommand, type BushMessage, type BushSlashMessage, type BushUser } from '@lib'; +import { MessageEmbed, type Snowflake } from 'discord.js'; // TODO: Add bot information export default class UserInfoCommand extends BushCommand { -- cgit