1# Use Client.wait_for to wait for on_message event.
2
3@commands.command()
4async def greet(ctx):
5 await ctx.send("Say hello!")
6
7 def check(m):
8 return m.content == "hello" and m.channel == channel
9
10 msg = await bot.wait_for("message", check=check)
11 await ctx.send(f"Hello {msg.author}!")