Custom Command
FunctionsMessage Functions

$sendDM

Premium ONLY!

Sends the output of the code to the message author's DMs or to the DMs of a specified user.

Usage

$sendDM[userID;message;return message id or undefined, if message could not be sent (yes/no, default is no)]
  • userID: (Optional) The ID of the user to send the DM to. If omitted, the DM will be sent to the message author.
  • message: The message to send in the DM.
  • return message ID: (Optional) Determines whether to return the ID of the sent DM. If the DM failed to send, then the return value would be undefined. Defaults to no if not provided.

Example 1: Sending a DM to the message author multiple times.

Member
11/19/2026

!!exec $sendDM[$authorID;I can add this multiple times in my code! This is time 1] $sendDM[$authorID;I can add this multiple times in my code! This is time 2]

Custom Bot
APP
11/19/2026

I can add this multiple times in my code! This is time 1

Custom Command
APP
11/19/2026

I can add this multiple times in my code! This is time 2

Note

You can send embeds using the Message Curl Format. This allows you to create richly formatted messages within the DM.

Related Functions

Function Difficulty: Medium

Tags: Send Message DM Send DM Message

Function Cooldown

This function has built-in cooldown. Why? Read more about cooldowns here.

  • Cooldown: 2 seconds
  • Tracked By: User
  • Type: channeluser

Functions with the same type share cooldowns based on the same Tracked By value.

On this page