Discord.py Rewrite How To Dm Commands?
I am trying to have my bot DM the user the help when '-help' is executed. I have tried doing this in my code already but it will not work. async def help(ctx): helpembed = discor
Solution 1:
To send a private message to a user in discord.py-rewrite, you use the User.send
method:
asyncdefhelp(ctx):
...
await ctx.author.send(...)
This is because User
is a subclass of the abstract Messageable
class
Post a Comment for "Discord.py Rewrite How To Dm Commands?"