K
Docs
API ReferencePiecesDirect Message
📩

Direct Message

base.dmBase SetMessages

Sends a private DM directly to a specific user. No one else sees it. Perfect for sending private results, warnings, or personalized info. Note: some users have DMs disabled — that's what the Error port is for.

When to use this
  • Always hook up the Error port — DMs silently fail when someone has them off
  • Great for sending sensitive info (scores, warnings) without embarrassing anyone publicly

On the canvas

This is what Direct Message looks like when you place it on your flow. Each field below is something you configure in the inspector panel.

📩
Direct Message
base.dm
Messages
userIdrequired
{{user.id}} or paste a user ID
contentrequired
Hey! Just wanted to let you know…
output
error

Config fields

FieldTypeReqWhat it does
userId
{{user.id}} or paste a user ID
textyesWho to DM 👤
content
Hey! Just wanted to let you know…
textareayesWhat to say 💬

Output ports

outputDM sent, moving on
errorUser has DMs disabled or the send failed
📐

In TypeScript, this would be…

Not something you need to write — just a look at what Kitcord does for you.

TypeScript
try {
  const user = await client.users.fetch(userId);
  await user.send("Hey! Just wanted to let you know…");
} catch {
  // DMs disabled — Error port
}