aboutsummaryrefslogtreecommitdiff
path: root/src/commands/info/pronouns.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-05-28 20:13:49 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-05-28 20:13:49 -0400
commit25cf269e2e793de5fefb9aa3f19fb167168e06c6 (patch)
treecd5f2f3c097a84a2483a70b57b3cbba7b6f4a6be /src/commands/info/pronouns.ts
parente220f8462bbfb26e3237df34923be4acc5d83fee (diff)
downloadtanzanite-25cf269e2e793de5fefb9aa3f19fb167168e06c6.tar.gz
tanzanite-25cf269e2e793de5fefb9aa3f19fb167168e06c6.tar.bz2
tanzanite-25cf269e2e793de5fefb9aa3f19fb167168e06c6.zip
stuff
Diffstat (limited to 'src/commands/info/pronouns.ts')
-rw-r--r--src/commands/info/pronouns.ts23
1 files changed, 5 insertions, 18 deletions
diff --git a/src/commands/info/pronouns.ts b/src/commands/info/pronouns.ts
index ca70ff0..c53c542 100644
--- a/src/commands/info/pronouns.ts
+++ b/src/commands/info/pronouns.ts
@@ -59,15 +59,9 @@ export default class PronounsCommand extends BushCommand {
slashEmphemeral: true // I'll add dynamic checking to this later
});
}
- async sendResponse(
- message: Message | CommandInteraction,
- user: User,
- author: boolean
- ): Promise<void> {
+ async sendResponse(message: Message | CommandInteraction, user: User, author: boolean): Promise<void> {
try {
- const apiRes: { pronouns: pronounsType } = await got
- .get(`https://pronoundb.org/api/v1/lookup?platform=discord&id=${user.id}`)
- .json();
+ const apiRes: { pronouns: pronounsType } = await got.get(`https://pronoundb.org/api/v1/lookup?platform=discord&id=${user.id}`).json();
if (message instanceof Message) {
message.reply(
new MessageEmbed({
@@ -94,13 +88,9 @@ export default class PronounsCommand extends BushCommand {
} catch (e) {
if (e instanceof HTTPError && e.response.statusCode === 404) {
if (author) {
- await message.reply(
- 'You do not appear to have any pronouns set. Please go to https://pronoundb.org/ and set your pronouns.'
- );
+ await message.reply('You do not appear to have any pronouns set. Please go to https://pronoundb.org/ and set your pronouns.');
} else {
- await message.reply(
- `${user.tag} does not appear to have any pronouns set. Please tell them to go to https://pronoundb.org/ and set their pronouns.`
- );
+ await message.reply(`${user.tag} does not appear to have any pronouns set. Please tell them to go to https://pronoundb.org/ and set their pronouns.`);
}
} else throw e;
}
@@ -109,10 +99,7 @@ export default class PronounsCommand extends BushCommand {
const u = user || message.author;
await this.sendResponse(message, u, u.id === message.author.id);
}
- async execSlash(
- message: CommandInteraction,
- { user }: { user?: SlashCommandOption<void> }
- ): Promise<void> {
+ async execSlash(message: CommandInteraction, { user }: { user?: SlashCommandOption<void> }): Promise<void> {
const u = user?.user || message.user;
await this.sendResponse(message, u, u.id === message.user.id);
}