bot wait for discord py

Solutions on MaxInterview for bot wait for discord py by the best coders in the world

showing results for - "bot wait for discord py"
Isabella
20 Jul 2020
1@client.event
2async def on_message(message):
3    if message.content.startswith('$greet'):
4        channel = message.channel
5        await channel.send('Say hello!')
6
7        def check(m):
8            return m.content == 'hello' and m.channel == channel
9
10        msg = await client.wait_for('message', check=check)
11        await channel.send('Hello {.author}!'.format(msg))
12