discord.com
send_dm
Input
userId requiredThe recipient's Discord user id, e.g. from discord.com/find_member_id or the author.id of discord.com/search_messages.
message requiredThe message text. Discord's own limit is 2000 characters.
expectedUsername requiredThe recipient's username, asserted against the handle on their profile before the message is typed. A mismatch aborts without sending, so a stale or wrong id cannot message the wrong person.
Output
sent requiredchannelId requiredThe one-to-one DM channel the message went to.
recipient requiredThe handle read from the recipient's own profile, not echoed from the input.
content optionalThe content as Discord stored it.
messageId optionaltimestamp optional