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

pull/8/head
sgoudham 4 years ago
parent 4926c6b242
commit 7f7f5bcf50

@ -586,10 +586,10 @@ class Guild(Cog):
# Surround with try/except to catch any exceptions that may occur # Surround with try/except to catch any exceptions that may occur
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) reaction, user = await self.bot.wait_for('reaction_add', check=emoji_check, timeout=60.0)
except Exception as ex: except asyncio.TimeoutError as ex:
print(ex) print(ex)
return await user_channel.delete()
else: else:
# Making sure that the reply is from the author # Making sure that the reply is from the author

Loading…
Cancel
Save