mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-19 18:16:34 +01:00
Allow jimmy to remove all bot messages
This commit is contained in:
parent
a4546cec01
commit
bc39411039
1 changed files with 1 additions and 14 deletions
|
@ -118,21 +118,8 @@ class Events(commands.Cog):
|
||||||
except discord.HTTPException:
|
except discord.HTTPException:
|
||||||
return
|
return
|
||||||
if payload.emoji.name == "\N{wastebasket}\U0000fe0f":
|
if payload.emoji.name == "\N{wastebasket}\U0000fe0f":
|
||||||
if message.author.id == self.bot.user.id:
|
if message.author.bot:
|
||||||
await message.delete(delay=0.25)
|
await message.delete(delay=0.25)
|
||||||
elif message.channel.permissions_for(message.guild.me).manage_messages:
|
|
||||||
reactions = 0
|
|
||||||
mod_reactions = 0
|
|
||||||
for reaction in message.reactions:
|
|
||||||
if reaction.emoji == payload.emoji:
|
|
||||||
async for member in reaction.users():
|
|
||||||
if member.id == self.bot.user.id:
|
|
||||||
continue
|
|
||||||
if member.guild_permissions.manage_messages:
|
|
||||||
mod_reactions += 1
|
|
||||||
reactions += 1
|
|
||||||
if reactions >= 2 or mod_reactions >= 1:
|
|
||||||
await message.delete(delay=0.1)
|
|
||||||
|
|
||||||
@commands.Cog.listener()
|
@commands.Cog.listener()
|
||||||
async def on_member_join(self, member: discord.Member):
|
async def on_member_join(self, member: discord.Member):
|
||||||
|
|
Loading…
Reference in a new issue