📜  discord.py 自动删除 - 任何代码示例

📅  最后修改于: 2022-03-11 15:00:38.859000             🧑  作者: Mango

代码示例1
@client.event
async def on_message(msg):
    try:
        if msg.guild.id == Your guild ID:
            if msg.channel.id == Your channel id:
                await asyncio.sleep(30)
                await msg.delete()
            else:
                pass
        else:
            pass
    except:
        pass