From 11c6803e42a7a794180c606c08a52c08a48bb4b1 Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Sun, 19 Feb 2023 18:57:25 -0600 Subject: [PATCH] fix: stop sending first time messages if DMs are disabled --- src/commands/train.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/commands/train.ts b/src/commands/train.ts index 6812c67..39ca1c5 100644 --- a/src/commands/train.ts +++ b/src/commands/train.ts @@ -53,7 +53,8 @@ export async function execute(interaction: CommandInteraction) { .addField('GitHub', '[Link](https://github.com/ADawesomeguy/AwesomeSciBo) (a star couldn\'t hurt...)') .setColor('#ffffff') .setTimestamp(); - interaction.user.send({ embeds: [firstTimeEmbed] }); + interaction.user.send({ embeds: [firstTimeEmbed] }) + .catch(err => log({ logger: 'train', content: `${err}`, level: 'error' })); } else if (obj) { score = obj.score;