Send Custom Buttons
AI-generatedSummary
Send a custom message to a Discord channel with optional embed and user-defined buttons.
Inputs
- channelId (required) — Discord channel ID where the message will be sent.
- content — Main message text.
- useEmbed — Whether to include an embed (boolean).
- embedTitle — Title of the embed (shown only if useEmbed is true).
- embedDescription — Description inside the embed (shown only if useEmbed is true).
- embedColor — Hex color for the embed left border (shown only if useEmbed is true).
- buttons — Collection of custom buttons, each with label, customId, and style.
Output shape
An array of JSON objects representing the Discord API response for each message sent.
If continueOnFail is enabled, failed sends return an object containing an error message; otherwise failures throw.
Examples
Example 1: Send a ticket notification with a green 'Submit' button and a red 'Cancel' button.
Set channelId to your channel ID, content to 'New ticket created', useEmbed false, and buttons with two items: Labels 'Submit' (style 3) and 'Cancel' (style 4) each having distinct customId values.
Example 2: Post an embed with a warning and a single success button.
Enable useEmbed, provide embedTitle and embedDescription, set embedColor, and define one button labeled 'Acknowledge' (style 3) with a customId.
Example 3: Send approval links using the 'sendCustom' operation.
Choose operation 'sendCustom', fill channelId and content, optionally add embed fields, and configure button values/labels as needed.