'discord.py on_message_delete TypeError: on_message_delete() missing 1 required positional argument: 'message'
This command not work, error: TypeError: on_message_delete() missing 1 required positional argument: 'message'
@client.event
async def on_message_delete(ctx,message):
with open('log.json', 'r', encoding='utf-8') as f:
guilds_dict = json.load(f)
embed = discord.Embed(title=f"deleted a message {message}",description="", color=0xFF0000)
embed.add_field(name=message.content, value=f"This is the message that he has deleted",inline=True)
channel_id = guilds_dict[str(ctx.guild.id)]
await client.get_channel(int(channel_id)).send(embed=embed)```
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
