delete last message discord.py
@client.event
async def on_message(message):
await message.delete(message)
delete last message discord.py
@client.event
async def on_message(message):
await message.delete(message)
How to retrieve previous messages with discord.py
@client.event
async def on_message(message):
c_channel = discord.utils.get(message.guild.text_channels, name='counting channel')
messages = await c_channel.history(limit=2).flatten()
if message.channel == c_channel and int(messages[1].content) + 1 != int(message.content):
await message.delete()
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us