aboutsummaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-11-07 09:43:35 -0500
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-11-07 09:43:35 -0500
commit4ca474ca0fb5809a4c65faf730f8465a96a355d9 (patch)
treec6426852d2628fcfe24d4f8356c907b3c42bb106 /src/commands
parenta39aa8c11a3fd5dd5f007865960ef5429744f057 (diff)
downloadtanzanite-4ca474ca0fb5809a4c65faf730f8465a96a355d9.tar.gz
tanzanite-4ca474ca0fb5809a4c65faf730f8465a96a355d9.tar.bz2
tanzanite-4ca474ca0fb5809a4c65faf730f8465a96a355d9.zip
fix some errors I hope
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/info/pronouns.ts2
-rw-r--r--src/commands/info/userInfo.ts4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/commands/info/pronouns.ts b/src/commands/info/pronouns.ts
index db1a3a4..fbbc5af 100644
--- a/src/commands/info/pronouns.ts
+++ b/src/commands/info/pronouns.ts
@@ -39,6 +39,8 @@ export default class PronounsCommand extends BushCommand {
const user = args.user ?? message.author;
const author = user.id === message.author.id;
+ if (message.util.isSlashMessage(message)) await message.interaction.deferReply()
+
const pronouns = await util.getPronounsOf(user);
if (!pronouns) {
return await message.util.reply(
diff --git a/src/commands/info/userInfo.ts b/src/commands/info/userInfo.ts
index 3afdff2..2b87d0b 100644
--- a/src/commands/info/userInfo.ts
+++ b/src/commands/info/userInfo.ts
@@ -95,8 +95,8 @@ export default class UserInfoCommand extends BushCommand {
const generalInfo = [`**Mention:** <@${user.id}>`, `**ID:** ${user.id}`, `**Created:** ${createdAt} (${createdAtDelta} ago)`];
if (user.accentColor !== null) generalInfo.push(`**Accent Color:** ${user.hexAccentColor}`);
if (user.banner) generalInfo.push(`**Banner:** [link](${user.bannerURL({ dynamic: true, format: 'png', size: 4096 })})`);
- const pronouns = await util.getPronounsOf(user);
- if (pronouns) generalInfo.push(`**Pronouns:** ${pronouns}`);
+ const pronouns = await Promise.race([util.getPronounsOf(user), util.sleep(2)]);
+ if (pronouns && typeof pronouns === 'string') generalInfo.push(`**Pronouns:** ${pronouns}`);
userEmbed.addField('ยป General Info', generalInfo.join('\n'));