Browse Source

Remove override button after usage

pull/41/head
Abheek Dhawan 3 years ago
parent
commit
848afcf5d8
Signed by: abheekd GPG Key ID: 7BE81B8C14475B67
  1. 7
      src/commands/train.ts

7
src/commands/train.ts

@ -168,9 +168,10 @@ export async function execute(interaction) {
filter: overrideFilter,
})
.then(i => {
updateScore(true, score, authorId).then((msgToReply) =>
i.reply(msgToReply),
);
updateScore(true, score, authorId).then(async msgToReply => {
await i.reply(msgToReply);
overrideMsg.edit({ components: [] });
});
}).catch(err => log({ logger: 'train', content: `Failed to override score: ${err}`, level: 'error' }));
}).catch(err => log({ logger: 'train', content: `Failed to send override message: ${err}`, level: 'error' }));
}

Loading…
Cancel
Save