Skip to content

Commit

Permalink
Delete user message after match cancel command
Browse files Browse the repository at this point in the history
  • Loading branch information
Kalissaac committed Aug 23, 2020
1 parent 7e34779 commit 4b76580
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/commands/match.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,10 @@ const cancel = async (message, GLOBALS) => {
.setTitle('Match Canceled')
.setDescription('Match with ID `' + matchID + '` has been canceled. Thanks for using ScrimBot, to create a new match type `v!match create`')
.setFooter('This message will self-destruct in 30 seconds.')
message.reply(embed).then(msg => msg.delete({ timeout: 30000 }))
message.reply(embed).then(msg => {
msg.delete({ timeout: 30000 })
message.delete({ timeout: 30000 })
})

const botMessageChannel = await GLOBALS.client.channels.fetch(matchInformation.message.channel)
const botMessage = await botMessageChannel.messages.fetch(matchID)
Expand Down

0 comments on commit 4b76580

Please sign in to comment.