Answers for "bot wait_for discord py"

0

bot wait_for discord py

@client.event
async def on_message(message):
    if message.content.startswith('$greet'):
        channel = message.channel
        await channel.send('Say hello!')

        def check(m):
            return m.content == 'hello' and m.channel == channel

        msg = await client.wait_for('message', check=check)
        await channel.send('Hello {.author}!'.format(msg))
Posted by: Guest on September-06-2021

Python Answers by Framework

Browse Popular Code Answers by Language