I tried so me code and didn't work for waiting messages so I wanna know how to wait for message in DM if the user sent a command in a channel using discord.py.
UPDATED
This is the last code which worked as example according to what the accepted answer!
async def command_name(ctx):
await ctx.send("Send a message in DM.")
def check(m):
return m.author == ctx.author and m.guild is None
msg = await client.wait_for('message', check=check)
# Do something after they sent a DM```