How to make a dm user command (

I’m new to (and general programming) I want to make a command which dms mentioned user with specified text. Can you please explain how to make it?

Hi @Lemon553311-dev , can you tell me what version of python and are you using?
sorry for my bad english, i’m spanish xD

I would help, but it was around 2 years ago I tried python bots. They are harder than JavaScript in my opinion.

xD maybe. I program bots in python since 2 months and i have a masterpiece.

This may help a bit.

1 Like

unactualized version of discord. The version of discord used in that link is old and for example bot.get_userinfo doesn’t exist

That sucks. Sorry, I’m not very familiar with python! :grin:

1 Like

no problem, we are for help.
sorry for my bad english, i’m spanish xD

1 Like

im using python 3.7.7 = 1.2.3

i have found a way to make bot say provided message but now i need to figure out how to make bot DM a specified user.

creating a dm channel in is explained here:

so you can simply get a message object, then use await"message") to send a message to a user via dms.

@Lemon553311-dev you can?

Instead of ctx.send("message") its"message") (basically user.send("message"))

1 Like

this helped me out so much. hours of looking for a simple way without having to retrieve a discord.Member object to send a message. Thank you so much for your help