Auto delete messages in verify and timetable

This commit is contained in:
nex 2022-10-29 21:50:20 +01:00
parent e0c951fffe
commit 5ef0e44857

View file

@ -97,6 +97,9 @@ class Events(commands.Cog):
await message.pin(reason="Automatic pinboard pinning")
except discord.HTTPException as e:
return await message.reply(f"Failed to auto-pin: {e}", delete_after=10)
elif message.channel.name in ("verify", "timetable") and message.author != self.bot.user:
if message.channel.permissions_for(message.guild.me).manage_messages:
await message.delete(delay=1)
def setup(bot):