How do I send a DM to a specific Discord user?

This topic was automatically generated from Slack. You can find the original thread here.

Tim Kracht : I have figured out how to use Pipedream to send a message to a Channel, but can it send a DM to a user?

Dylan Sather (Pipedream) : Hi , what app are you working with?

Tim Kracht : Discord

Tim Kracht : Sorry should have mentioned

Dylan Sather (Pipedream) : The native Discord Webhook integration doesn’t allow this (this is a restriction on Discord’s end), but you can use our Discord Bot integration to create your own bot, add it to your server, and use this API endpoint to send a DM.

Tim Kracht : Thanks Dylan I will see what I can do.

Tim Kracht : Dylan, as I see it I will need to create the DM action correct. Just wanted to double check as I do not see it in the list of available actions.

Dylan Sather (Pipedream) : technically you can add a new Node.js code step to your workflow and make the POST request from there, connecting your Discord Bot app to the code step and referencing the auths object to pass your bot’s credentials.

But you can definitely create an action to handle that logic, which will be useful if you’re reusing the code across workflows. You can even contribute that for other users to use!

Sorry for all the links to docs - I wanted to give you as much info as possible :slightly_smiling_face:

Tim Kracht : That works, I am not much of a programmer so the reference material is a plus :slightly_smiling_face: I like to cut and paste :wink:

Dylan Sather (Pipedream) : even seasoned programmers do, too!