aboutsummaryrefslogtreecommitdiff
path: root/src/commands/info/snowflake.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-01-28 20:21:34 -0500
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-01-28 20:21:34 -0500
commit78ab3362a52578d0bcada903732f147747c609df (patch)
tree6b848fbb3aed633d9177d6128921c975bdecb1c5 /src/commands/info/snowflake.ts
parent9e1713721d9f46ef1d847b685dedd7f1016f87c0 (diff)
downloadtanzanite-78ab3362a52578d0bcada903732f147747c609df.tar.gz
tanzanite-78ab3362a52578d0bcada903732f147747c609df.tar.bz2
tanzanite-78ab3362a52578d0bcada903732f147747c609df.zip
snowflake channel type reverse enm map
Diffstat (limited to 'src/commands/info/snowflake.ts')
-rw-r--r--src/commands/info/snowflake.ts16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/commands/info/snowflake.ts b/src/commands/info/snowflake.ts
index feaa724..7efd3ce 100644
--- a/src/commands/info/snowflake.ts
+++ b/src/commands/info/snowflake.ts
@@ -42,7 +42,7 @@ export default class SnowflakeCommand extends BushCommand {
// Channel
if (client.channels.cache.has(snowflake)) {
const channel = client.channels.resolve(snowflake)!;
- const channelInfo = [`**Type:** ${channel.type}`];
+ const channelInfo = [`**Type:** ${BushChannelType[channel.type]}`];
if (channel.isDM()) {
channelInfo.push(`**Recipient:** ${util.discord.escapeMarkdown(channel.recipient.tag)} (${channel.recipient.id})`);
snowflakeEmbed.setTitle(`:snowflake: DM with ${util.discord.escapeMarkdown(channel.recipient.tag)} \`[Channel]\``);
@@ -131,3 +131,17 @@ export default class SnowflakeCommand extends BushCommand {
return await message.util.reply({ embeds: [snowflakeEmbed] });
}
}
+
+enum BushChannelType {
+ 'Text' = 0,
+ 'DM' = 1,
+ 'Voice' = 2,
+ 'Group DM' = 3,
+ 'Category' = 4,
+ 'Announcement' = 5,
+ 'Announcement Store' = 6,
+ 'News Thread' = 10,
+ 'Public Thread' = 11,
+ 'Private Thread' = 12,
+ 'Stage' = 13
+}