aboutsummaryrefslogtreecommitdiff
path: root/src/commands/info
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-10-26 20:07:19 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-10-26 20:07:19 -0400
commited59b7f1827ab93573b079144c3eeaa01ce40492 (patch)
tree7ceac6d61a8a25586ab9bbaf7acfbade91c97132 /src/commands/info
parentc0a81b014a56e4d44c826f78391a930361aab122 (diff)
downloadtanzanite-ed59b7f1827ab93573b079144c3eeaa01ce40492.tar.gz
tanzanite-ed59b7f1827ab93573b079144c3eeaa01ce40492.tar.bz2
tanzanite-ed59b7f1827ab93573b079144c3eeaa01ce40492.zip
clean up, bug fixes
Diffstat (limited to 'src/commands/info')
-rw-r--r--src/commands/info/avatar.ts6
-rw-r--r--src/commands/info/botInfo.ts10
-rw-r--r--src/commands/info/color.ts7
-rw-r--r--src/commands/info/guildInfo.ts11
-rw-r--r--src/commands/info/icon.ts6
-rw-r--r--src/commands/info/links.ts4
-rw-r--r--src/commands/info/ping.ts6
-rw-r--r--src/commands/info/pronouns.ts8
-rw-r--r--src/commands/info/snowflake.ts4
-rw-r--r--src/commands/info/userInfo.ts8
10 files changed, 32 insertions, 38 deletions
diff --git a/src/commands/info/avatar.ts b/src/commands/info/avatar.ts
index 40debf0..44e1556 100644
--- a/src/commands/info/avatar.ts
+++ b/src/commands/info/avatar.ts
@@ -8,8 +8,8 @@ export default class AvatarCommand extends BushCommand {
category: 'info',
description: {
content: "A command to get a user's avatar",
- usage: 'avatar [user]',
- examples: 'avatar'
+ usage: ['avatar [user]'],
+ examples: ['avatar', 'av IRONM00N']
},
args: [
{
@@ -36,7 +36,7 @@ export default class AvatarCommand extends BushCommand {
});
}
- override async exec(message: BushMessage | BushSlashMessage, args: { user: GuildMember | User }): Promise<void> {
+ override async exec(message: BushMessage | BushSlashMessage, args: { user: GuildMember | User }) {
const params: { size: 2048; format: 'png'; dynamic: true } = { size: 2048, format: 'png', dynamic: true };
const defaultAvatar = `https://cdn.discordapp.com/embed/avatars/${Math.ceil(Math.random() * 6) - 1}.png`;
diff --git a/src/commands/info/botInfo.ts b/src/commands/info/botInfo.ts
index ffb785c..a072224 100644
--- a/src/commands/info/botInfo.ts
+++ b/src/commands/info/botInfo.ts
@@ -5,13 +5,13 @@ import prettyBytes from 'pretty-bytes';
export default class BotInfoCommand extends BushCommand {
public constructor() {
- super('botinfo', {
- aliases: ['botinfo', 'stats'],
+ super('botInfo', {
+ aliases: ['bot-info', 'stats'],
category: 'info',
description: {
content: 'Shows information about the bot',
- usage: 'botinfo',
- examples: ['botinfo']
+ usage: ['bot-info'],
+ examples: ['bot-info']
},
slash: true,
clientPermissions: (m) => util.clientSendAndPermCheck(m, ['EMBED_LINKS'], true),
@@ -19,7 +19,7 @@ export default class BotInfoCommand extends BushCommand {
});
}
- public override async exec(message: BushMessage | BushSlashMessage): Promise<void> {
+ public override async exec(message: BushMessage | BushSlashMessage) {
enum Platform {
aix = 'AIX',
android = 'Android',
diff --git a/src/commands/info/color.ts b/src/commands/info/color.ts
index 958aadd..021f319 100644
--- a/src/commands/info/color.ts
+++ b/src/commands/info/color.ts
@@ -16,7 +16,7 @@ export default class ColorCommand extends BushCommand {
category: 'info',
description: {
content: 'Find the color of a hex code, user, or role.',
- usage: 'color <color|role|user>',
+ usage: ['color <color|role|user>'],
examples: ['color #0000FF']
},
args: [
@@ -40,10 +40,7 @@ export default class ColorCommand extends BushCommand {
return color.substr(4, color.length - 5);
}
- public override async exec(
- message: BushMessage | BushSlashMessage,
- args: { color: string | BushRole | BushGuildMember }
- ): Promise<unknown> {
+ public override async exec(message: BushMessage | BushSlashMessage, args: { color: string | BushRole | BushGuildMember }) {
const color =
typeof args.color === 'string'
? tinycolor(args.color)
diff --git a/src/commands/info/guildInfo.ts b/src/commands/info/guildInfo.ts
index 2945050..3a592e9 100644
--- a/src/commands/info/guildInfo.ts
+++ b/src/commands/info/guildInfo.ts
@@ -4,12 +4,12 @@ import { BaseGuildVoiceChannel, Guild, GuildPreview, MessageEmbed, Snowflake, Va
export default class GuildInfoCommand extends BushCommand {
public constructor() {
super('guildInfo', {
- aliases: ['guildinfo', 'serverinfo', 'guild', 'server', 'g'],
+ aliases: ['guild-info', 'serverinfo', 'guild', 'server', 'g'],
category: 'info',
description: {
content: 'Get info about a server.',
- usage: 'guildinfo [guild]',
- examples: ['guildinfo 516977525906341928']
+ usage: ['guild-info [guild]'],
+ examples: ['guild-info 516977525906341928']
},
args: [
{
@@ -36,10 +36,7 @@ export default class GuildInfoCommand extends BushCommand {
});
}
- public override async exec(
- message: BushMessage | BushSlashMessage,
- args: { guild: Guild | Snowflake | GuildPreview }
- ): Promise<unknown> {
+ public override async exec(message: BushMessage | BushSlashMessage, args: { guild: Guild | Snowflake | GuildPreview }) {
if (!args?.guild && !message.guild) {
return await message.util.reply(
`${util.emojis.error} You must either provide an server to provide info about or run this command in a server.`
diff --git a/src/commands/info/icon.ts b/src/commands/info/icon.ts
index 08538d7..0eb7bfc 100644
--- a/src/commands/info/icon.ts
+++ b/src/commands/info/icon.ts
@@ -8,8 +8,8 @@ export default class IconCommand extends BushCommand {
category: 'info',
description: {
content: "A command to get the server's icon",
- usage: 'icon',
- examples: 'icon'
+ usage: ['icon'],
+ examples: ['icon']
},
clientPermissions: (m) => util.clientSendAndPermCheck(m, ['EMBED_LINKS'], true),
userPermissions: [],
@@ -18,7 +18,7 @@ export default class IconCommand extends BushCommand {
});
}
- override async exec(message: BushMessage | BushSlashMessage): Promise<void> {
+ override async exec(message: BushMessage | BushSlashMessage) {
const embed = new MessageEmbed()
.setTimestamp()
.setColor(util.colors.default)
diff --git a/src/commands/info/links.ts b/src/commands/info/links.ts
index 754b22b..7b52fef 100644
--- a/src/commands/info/links.ts
+++ b/src/commands/info/links.ts
@@ -9,7 +9,7 @@ export default class LinksCommand extends BushCommand {
category: 'info',
description: {
content: 'Sends bot links',
- usage: 'links',
+ usage: ['links'],
examples: ['links']
},
clientPermissions: (m) => util.clientSendAndPermCheck(m),
@@ -18,7 +18,7 @@ export default class LinksCommand extends BushCommand {
});
}
- public override async exec(message: BushMessage | BushSlashMessage): Promise<unknown> {
+ public override async exec(message: BushMessage | BushSlashMessage) {
if (client.config.isDevelopment) return await message.util.reply(`${util.emojis.error} The dev bot cannot be invited.`);
const ButtonRow = new MessageActionRow().addComponents(
new MessageButton({
diff --git a/src/commands/info/ping.ts b/src/commands/info/ping.ts
index 82db2ff..8d05307 100644
--- a/src/commands/info/ping.ts
+++ b/src/commands/info/ping.ts
@@ -8,7 +8,7 @@ export default class PingCommand extends BushCommand {
category: 'info',
description: {
content: 'Gets the latency of the bot',
- usage: 'ping',
+ usage: ['ping'],
examples: ['ping']
},
slash: true,
@@ -17,7 +17,7 @@ export default class PingCommand extends BushCommand {
});
}
- public override async exec(message: BushMessage): Promise<void> {
+ public override async exec(message: BushMessage) {
const sentMessage = (await message.util.send('Pong!')) as Message;
const timestamp: number = message.editedTimestamp ? message.editedTimestamp : message.createdTimestamp;
const botLatency = `${'```'}\n ${Math.round(sentMessage.createdTimestamp - timestamp)}ms ${'```'}`;
@@ -35,7 +35,7 @@ export default class PingCommand extends BushCommand {
});
}
- public override async execSlash(message: BushSlashMessage): Promise<void> {
+ public override async execSlash(message: BushSlashMessage) {
const timestamp1 = message.interaction.createdTimestamp;
await message.interaction.reply('Pong!');
const timestamp2 = await message.interaction.fetchReply().then((m) => (m as Message).createdTimestamp);
diff --git a/src/commands/info/pronouns.ts b/src/commands/info/pronouns.ts
index cd66530..132b719 100644
--- a/src/commands/info/pronouns.ts
+++ b/src/commands/info/pronouns.ts
@@ -7,9 +7,9 @@ export default class PronounsCommand extends BushCommand {
aliases: ['pronouns', 'pronoun'],
category: 'info',
description: {
- usage: 'pronouns <user>',
- examples: ['pronouns IRONM00N'],
- content: 'Finds the pronouns of a user using https://pronoundb.org.'
+ content: 'Finds the pronouns of a user using https://pronoundb.org.',
+ usage: ['pronouns <user>'],
+ examples: ['pronouns IRONM00N']
},
args: [
{
@@ -35,7 +35,7 @@ export default class PronounsCommand extends BushCommand {
slash: true
});
}
- override async exec(message: BushMessage | BushSlashMessage, args: { user?: User }): Promise<unknown> {
+ override async exec(message: BushMessage | BushSlashMessage, args: { user?: User }) {
const user = args.user ?? message.author;
const author = user.id === message.author.id;
diff --git a/src/commands/info/snowflake.ts b/src/commands/info/snowflake.ts
index b203d94..2b75b30 100644
--- a/src/commands/info/snowflake.ts
+++ b/src/commands/info/snowflake.ts
@@ -24,7 +24,7 @@ export default class SnowflakeCommand extends BushCommand {
category: 'info',
description: {
content: 'Provides information about the specified Snowflake.',
- usage: 'snowflake <snowflake>',
+ usage: ['snowflake <snowflake>'],
examples: ['snowflake 322862723090219008']
},
args: [
@@ -51,7 +51,7 @@ export default class SnowflakeCommand extends BushCommand {
]
});
}
- public override async exec(message: BushMessage | BushSlashMessage, args: { snowflake: Snowflake }): Promise<unknown> {
+ public override async exec(message: BushMessage | BushSlashMessage, args: { snowflake: Snowflake }) {
const snowflake = `${args.snowflake}` as Snowflake;
const snowflakeEmbed = new MessageEmbed().setTitle('Unknown :snowflake:').setColor(util.colors.default);
diff --git a/src/commands/info/userInfo.ts b/src/commands/info/userInfo.ts
index 17be687..b3c8a67 100644
--- a/src/commands/info/userInfo.ts
+++ b/src/commands/info/userInfo.ts
@@ -8,9 +8,9 @@ export default class UserInfoCommand extends BushCommand {
aliases: ['user-info', 'user', 'u'],
category: 'info',
description: {
- usage: 'user-info [user]',
- examples: ['user-info 322862723090219008'],
- content: 'Gives information about a specified user.'
+ content: 'Gives information about a specified user.',
+ usage: ['user-info [user]'],
+ examples: ['user-info 322862723090219008']
},
args: [
{
@@ -37,7 +37,7 @@ export default class UserInfoCommand extends BushCommand {
});
}
- public override async exec(message: BushMessage | BushSlashMessage, args: { user: BushUser | Snowflake }): Promise<unknown> {
+ public override async exec(message: BushMessage | BushSlashMessage, args: { user: BushUser | Snowflake }) {
const user =
args?.user === undefined || args?.user === null
? message.author