Answers for "discord.py last message from member"

1

delete last message discord.py

@client.event
async def on_message(message):
    await message.delete(message)
Posted by: Guest on July-29-2021
0

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()
Posted by: Guest on June-14-2021

Code answers related to "discord.py last message from member"

Python Answers by Framework

Browse Popular Code Answers by Language