aboutsummaryrefslogtreecommitdiff
path: root/src/commands/info/snowflake.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-06-14 12:47:57 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-06-14 12:47:57 -0400
commit661e4c9935aeb8760dafc7ced4bbec6cc356a033 (patch)
treebb4c12bdef067d203f100e13e05ccb705b299834 /src/commands/info/snowflake.ts
parenteaf592b72eb5b1d66aa2bde5151a8947570a506c (diff)
downloadtanzanite-661e4c9935aeb8760dafc7ced4bbec6cc356a033.tar.gz
tanzanite-661e4c9935aeb8760dafc7ced4bbec6cc356a033.tar.bz2
tanzanite-661e4c9935aeb8760dafc7ced4bbec6cc356a033.zip
remove the war crimes that I previously committed
- Remove custom typings and replace with declaration merging - Fix the typings for args - Replace all discord-api-types imports with discord.js imports - Fix discord.js breaking changes
Diffstat (limited to 'src/commands/info/snowflake.ts')
-rw-r--r--src/commands/info/snowflake.ts16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/commands/info/snowflake.ts b/src/commands/info/snowflake.ts
index 07544c9..e74756f 100644
--- a/src/commands/info/snowflake.ts
+++ b/src/commands/info/snowflake.ts
@@ -1,4 +1,4 @@
-import { BushCommand, type ArgType, type BushMessage, type BushSlashMessage } from '#lib';
+import { BushCommand, type ArgType, type CommandMessage, type SlashMessage } from '#lib';
import { stripIndent } from '#tags';
import {
ApplicationCommandOptionType,
@@ -37,7 +37,7 @@ export default class SnowflakeCommand extends BushCommand {
});
}
- public override async exec(message: BushMessage | BushSlashMessage, args: { snowflake: ArgType<'snowflake'> }) {
+ public override async exec(message: CommandMessage | SlashMessage, args: { snowflake: ArgType<'snowflake'> }) {
const snowflake = `${args.snowflake}` as Snowflake;
const snowflakeEmbed = new EmbedBuilder().setTitle('Unknown :snowflake:').setColor(util.colors.default);
@@ -45,7 +45,7 @@ export default class SnowflakeCommand extends BushCommand {
if (client.channels.cache.has(snowflake)) {
const channel = client.channels.resolve(snowflake)!;
const channelInfo = [`**Type:** ${BushChannelType[channel.type] ?? ChannelType[channel.type]}`];
- if (channel.isDM()) {
+ if (channel.type === ChannelType.DM) {
channelInfo.push(
`**Recipient:** ${util.discord.escapeMarkdown(channel.recipient?.tag ?? '¯\\_(ツ)_/¯')} (${
channel.recipient?.id ?? '¯\\_(ツ)_/¯'
@@ -55,11 +55,11 @@ export default class SnowflakeCommand extends BushCommand {
`:snowflake: DM with ${util.discord.escapeMarkdown(channel.recipient?.tag ?? '¯\\_(ツ)_/¯')} \`[Channel]\``
);
} else if (
- channel.isCategory() ||
- channel.isNews() ||
- channel.isText() ||
- channel.isVoice() ||
- channel.isStage() ||
+ channel.type === ChannelType.GuildCategory ||
+ channel.type === ChannelType.GuildNews ||
+ channel.type === ChannelType.GuildText ||
+ channel.type === ChannelType.GuildVoice ||
+ channel.type === ChannelType.GuildStageVoice ||
channel.isThread()
) {
channelInfo.push(