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