I've been working on a discord bot and I was able to create the snipe command that, well snipes the recent deleted message but now I'm trying to program it to be able to edit snipe which is to snipe the recently edited message
Here is my snipe deleted messages code
async def on_ready(self):
print('Snipe commands are working')
@commands.Cog.listener()
async def on_message_delete(self, message):
global snipe_message_content
global snipe_message_author
global snipe_message_id
global snipe_message_channel
global snipe_message_author_avatar
global a
global b
snipe_message_content = message.content
snipe_message_author = message.author.id
snipe_message_id = message.id
snipe_message_channel = message.channel
snipe_message_author_avatar = message.author.avatar_url
a = message.author.name
b = message.author.discriminator
if (snipe_message_author in botsid):
m == 1
else:
embed = discord.Embed(description=f"????️ **Message sent by** <@!{snipe_message_author}> **deleted in** {message.channel.mention} \n \n {snipe_message_content}")
embed.set_author(name= f" {message.author.name}#{message.author.discriminator}")
channel = self.client.get_channel(795726497922809947)
await channel.send(embed=embed)