Skip to content

Commit

Permalink
Add random emoji to solve message in Discord
Browse files Browse the repository at this point in the history
  • Loading branch information
JJ-8 committed Nov 12, 2024
1 parent 9a54a08 commit a68cfef
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion api/src/discord/agile/commands/solveTask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,15 @@ export async function handleTaskSolved(

await moveChannel(guild, task, null, ChannelMovingEvent.SOLVED);

return sendMessageToTask(
const message = await sendMessageToTask(
guild,
id,
`${task.title} is solved by ${await convertToUsernameFormat(userId)}!`
);

const emojis = ["🎉", "🎊", "🥳", "👏", "🔥", "🚀", "💪"];

message?.react(emojis[Math.floor(Math.random() * emojis.length)].toString());
}

async function solveTaskLogic(client: Client, interaction: CommandInteraction) {
Expand Down

0 comments on commit a68cfef

Please sign in to comment.