If user does not react within 60 seconds. Delete the modmail channel

pull/8/head
sgoudham 4 years ago
parent 7f7f5bcf50
commit 71e5088b3b

@ -587,6 +587,8 @@ class Guild(Cog):
try: try:
# Wait for the user to add a reaction # Wait for the user to add a reaction
reaction, user = await self.bot.wait_for('reaction_add', check=emoji_check, timeout=60.0) reaction, user = await self.bot.wait_for('reaction_add', check=emoji_check, timeout=60.0)
# Delete channel if user does not react within 60 seconds
except asyncio.TimeoutError as ex: except asyncio.TimeoutError as ex:
print(ex) print(ex)
await user_channel.delete() await user_channel.delete()

Loading…
Cancel
Save