Skip to main content
The Deno 2 Release Candidate is here
Learn more
Latest
function sendDirectMessage
Re-export
import { sendDirectMessage } from "https://deno.land/x/discordeno_patched@18.0.3/template/beginner/deps.ts";

Sends a direct message to a user. This can take two API calls. The first call is to create a dm channel. Then sending the message to that channel. Channel ids are cached as needed to prevent duplicate requests.

Parameters

bot: Bot
userId: BigString
content: string | CreateMessage