Skip to content

Commit

Permalink
fix issue #14
Browse files Browse the repository at this point in the history
  • Loading branch information
Kilvoctu committed Oct 29, 2022
1 parent bf7cc3a commit 81ec359
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions aiya.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,13 @@ async def on_raw_reaction_add(ctx):
if message.embeds:
if message.embeds[0].footer.text == f'{ctx.member.name}#{ctx.member.discriminator}':
await message.delete()
# this is for deleting generations in DMs
except:
#todo: I need to add a way for bot to delete DM generations
pass
channel = await self.fetch_user(ctx.user_id)
message = await channel.fetch_message(ctx.message_id)
if message.embeds:
if message.embeds[0].footer.text == f'{ctx.member.name}#{ctx.member.discriminator}':
await message.delete()

@self.event
async def on_guild_join(guild):
Expand Down

0 comments on commit 81ec359

Please sign in to comment.