diff --git a/src/commands/train.ts b/src/commands/train.ts index 0eb24bc..4169e96 100644 --- a/src/commands/train.ts +++ b/src/commands/train.ts @@ -42,6 +42,14 @@ export async function execute(interaction : CommandInteraction) { .then((obj: { score: number; }, err: unknown) => { if (!obj) { score = 0; + const firstTimeEmbed = new MessageEmbed() + .setAuthor({ name: interaction.client.user?.tag ? interaction.client.user?.tag : '', iconURL: interaction.client.user?.displayAvatarURL() }) + .setDescription('Hey! It seems like it\'s your first time using AwesomeSciBo. Here\'s some information regarding the bot if you need it (for issues, contributions, etc.):') + .addField('Creator', '<@745063586422063214> [@abheekd#3602]') + .addField('GitHub', '[Link](https://github.com/ADawesomeguy/AwesomeSciBo) (a star couldn\'t hurt...)') + .setColor('#ffffff') + .setTimestamp(); + interaction.user.send({ embeds: [firstTimeEmbed] }); } else if (obj) { score = obj.score; @@ -128,22 +136,6 @@ export async function execute(interaction : CommandInteraction) { if (answerMsg?.author.id === interaction.client.user?.id) return; - - const doc = userScore.findOne({ - authorID: authorId, - }); - - if (!doc) { - const firstTimeEmbed = new MessageEmbed() - .setAuthor({ name: interaction.client.user?.tag ? interaction.client.user?.tag : '', iconURL: interaction.client.user?.displayAvatarURL() }) - .setDescription('Hey! It seems like it\'s your first time using AwesomeSciBo. Here\'s some information regarding the bot if you need it (for issues, contributions, etc.):') - .addField('Creator', '<@745063586422063214> [@abheekd#3602]') - .addField('GitHub', '[Link](https://github.com/ADawesomeguy/AwesomeSciBo) (a star couldn\'t hurt...)') - .setColor('#ffffff') - .setTimestamp(); - answerMsg?.author.send({ embeds: [firstTimeEmbed] }); - } - let predicted = ''; if (answerMsg?.content.toLowerCase() === tossupAnswer.toLowerCase() || answers.includes(answerMsg?.content.toUpperCase())) { predicted = 'correct';