diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-01-28 20:21:34 -0500 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-01-28 20:21:34 -0500 |
commit | 78ab3362a52578d0bcada903732f147747c609df (patch) | |
tree | 6b848fbb3aed633d9177d6128921c975bdecb1c5 /src/commands | |
parent | 9e1713721d9f46ef1d847b685dedd7f1016f87c0 (diff) | |
download | tanzanite-78ab3362a52578d0bcada903732f147747c609df.tar.gz tanzanite-78ab3362a52578d0bcada903732f147747c609df.tar.bz2 tanzanite-78ab3362a52578d0bcada903732f147747c609df.zip |
snowflake channel type reverse enm map
Diffstat (limited to 'src/commands')
-rw-r--r-- | src/commands/info/snowflake.ts | 16 | ||||
-rw-r--r-- | src/commands/info/userInfo.ts | 4 |
2 files changed, 18 insertions, 2 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 +} 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); } |