auto-delete error messages

This commit is contained in:
xeals 2023-04-26 17:31:51 +10:00
parent 225cac02c0
commit 4f1e84ba8e
Signed by: xeals
GPG Key ID: A498C7AF27EC6B5C

4
bot.py
View File

@ -78,7 +78,9 @@ class BotClient(discord.Client):
calc = await self._calculate(args)
await message.reply(content=calc.strip())
except Exception as e:
await message.reply(content="```\n" + str(e) + "\n```")
await message.reply(
content="```\n" + str(e) + "\n```", delete_after=30
)
case _:
_log.info(f"Unrecognised command {command}")