[Python] How to make discord.py bot delete its own message after some time?

Discussão em 'Python' iniciado por Stack, Janeiro 24, 2025.

  1. Stack

    Stack Membro Participativo

    I have this code in Python:

    import discord
    client = commands.Bot(command_prefix='!')

    @client.event
    async def on_voice_state_update(member):
    channel = client.get_channel(channels_id_where_i_want_to_send_message))
    response = f'Hello {member}!'
    await channel.send(response)

    client.run('bots_token')



    And I want the bot to delete its own message. For example, after one minute, how do I do it?

    Continue reading...

Compartilhe esta Página