aboutsummaryrefslogtreecommitdiff
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
parent9e1713721d9f46ef1d847b685dedd7f1016f87c0 (diff)
downloadtanzanite-78ab3362a52578d0bcada903732f147747c609df.tar.gz
tanzanite-78ab3362a52578d0bcada903732f147747c609df.tar.bz2
tanzanite-78ab3362a52578d0bcada903732f147747c609df.zip
snowflake channel type reverse enm map
-rw-r--r--.vscode/launch.json3
-rw-r--r--src/commands/info/snowflake.ts16
-rw-r--r--src/commands/info/userInfo.ts4
3 files changed, 21 insertions, 2 deletions
diff --git a/.vscode/launch.json b/.vscode/launch.json
index 91f1fa1..ef7a204 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -11,6 +11,9 @@
"name": "BushBot",
"request": "launch",
"type": "pwa-node",
+ "runtimeArgs": [
+ "--experimental-specifier-resolution=node"
+ ],
"skipFiles": [
"<node_internals>/**",
// "**/Yarn/**",
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
+}
diff --git a/src/commands/info/userInfo.ts b/src/commands/info/userInfo.ts
index b8d97a8..2f35770 100644
--- a/src/commands/info/userInfo.ts
+++ b/src/commands/info/userInfo.ts
@@ -78,7 +78,9 @@ export default class UserInfoCommand extends BushCommand {
Number(user.discriminator) < 10 ||
client.consts.mappings.maybeNitroDiscrims.includes(user.discriminator) ||
user.displayAvatarURL()?.endsWith('.gif') ||
- user.flags?.has(UserFlags.FLAGS.PARTNER)
+ user.flags?.has(UserFlags.FLAGS.PARTNER) ||
+ user.flags?.has(UserFlags.FLAGS.STAFF) ||
+ member?.avatar // server avatar
) {
emojis.push(client.consts.mappings.otherEmojis.Nitro);
}