Custom Commands V3Beta

Anything can start a flow

Every flow begins with a trigger, and the catalogue has 96 of them. The Daily question flow starts on the clock at 09:00, with nobody typing anything. The same editor starts a flow from a command, a button, a new member or a message.

Daily question

ActiveSave

Trigger

Change

Schedule, every day at 09:00

#1

Get storage value(get-storage-value)

Read the question catalogue from{questions}

#2

Pick the next entry(array-at)

The one after yesterday's

#3

Send message(send-message)

Post the question as an embed in#general

#4

Create thread(start-thread-from-message)

Open a thread on that message

#5

Increase storage value(increment-storage-value)

Count the question as asked in{asked}

Illustration only - actual interface may differ

Slash commands are one trigger of many

The catalogue ships 96 triggers. A flow can start from a command, from something a member does, from something that changes in your server, or from the clock. You pick the trigger first, and the editor shows you the values it hands your flow.

Slash commands and context menus

Slash command, Message context menu used, Autocomplete requested.

Buttons, select menus and modals

Button clicked, String select menu submitted, Modal submitted.

Messages, reactions and polls

Message created, Reaction added, plus edits, deletions and poll events.

Members, bans and boosts

Member joined, Member left, Member boosted server, bans and unbans.

Channels, roles and threads

Created, updated and deleted, for all three.

Voice and stage channels

Voice state updated, plus stage instance events.

AutoMod

AutoMod action executed, and three more AutoMod triggers.

Invites, emojis and stickers

An invite created, an emoji renamed, a sticker added.

Discord's scheduled events

From created to started, for the events tab of your server.

Server settings, audit log and webhooks

A setting changed, an audit log entry written, a webhook updated.

Schedules, manual runs and custom events

Schedule, Scheduled run, Manual trigger, Custom event received.

Your bot itself

Ten triggers about the bot user, for flows that watch the bot rather than a member.

Slash commands get an option builder in the dashboard: name, description, type and a required flag per option, minimum and maximum value, minimum and maximum length, allowed channel types, and either fixed choices or autocomplete. An autocomplete flow answers while the member types, and may only use actions that change nothing.

Some flows should run when nobody is watching

A schedule is a trigger like any other. The Daily question flow has no command and no member behind it: the clock fires, the flow reads the catalogue and posts. Instead of a cron text box the dashboard gives you a picker with presets, so you choose the rhythm and move on.

Presets instead of cron syntax

Pick a daily, weekly or interval preset, set the time, done.

Nobody has to be there

The trigger fires on the clock, the flow runs, the message posts.

Flows can book their own runs

Schedule flow run books a later run from inside a flow, and there are actions to cancel and list what is pending.

The same flow, and the trigger chip that starts it

Daily question

ActiveSave

Trigger

Change

Schedule, every day at 09:00

#1

Get storage value(get-storage-value)

Read the question catalogue from{questions}

#2

Pick the next entry(array-at)

The one after yesterday's

#3

Send message(send-message)

Post the question as an embed in#general

#4

Create thread(start-thread-from-message)

Open a thread on that message

#5

Increase storage value(increment-storage-value)

Count the question as asked in{asked}

Illustration only - actual interface may differ

Buttons, select menus and modals

A button is a trigger. Post a message with buttons or a select menu, and each component starts its own flow. That message can sit in your server for months: an idle button costs nothing and never expires. Discuss in thread under the daily question is one flow, and the /suggest command that opens a modal is another.

Buttons

Button clicked starts a flow. The button lives on the message, the logic lives in the flow.

Select menus

All five kinds, including String select menu submitted.

Modals

Show a form, then continue when it comes back as Modal submitted.

The daily question, and a suggestion later that morning

general
Online
Your botBOT09:00

Question of the day

What is the one game you keep coming back to, no matter how old it gets?

Question 42 of 120

Miraused10:12

/suggest

Your botBOT10:12

Question added

Thanks Mira. Your suggestion went into the catalogue as number 121, and the Daily question flow will pick it up.

Started by: Modal submitted

Message #general

Illustration only - actual interface and behavior may differ

Cooldowns and privileged intents

Triggers that can fire often need a limit. Every flow can carry a cooldown on its trigger, and a run a cooldown blocks is written to the run history as skipped, so a quiet flow is never a mystery.

A cooldown per flow

On or off, with a scope of user, channel or server, and a duration you set yourself.

Blocked runs still show up

The run history says the run was skipped and names the reason.

Some triggers need a privileged intent

Discord only delivers message, member and presence events once you switch the matching intent on for your own bot application in the Discord developer portal. The editor marks those triggers and links Discord's documentation, and your bot needs one restart afterwards before such a flow can fire.

Answer streak

ActiveSave

Trigger

Change

Message created, with a cooldown per member

#1

Increase storage value(increment-storage-value)

Count the answer for that member in{answers}

#2

If(if)

The member has answered ten days in a row

#3

Add role to member(add-role-to-member)

Give them the Regular role

Illustration only - actual interface may differ

Questions about triggers

Yes. Message created is a trigger of its own, and there are nine message triggers in total plus reaction triggers such as Reaction added. A flow started that way gets the message and can count it, check it, reply to it or store something about it.

Want your server in the beta?

V3 is a large system and it still moves fast, so servers come in one at a time instead of all at once. Every application is read by a person, and you hear back within a few days.

The servers already in the beta decide a good part of what we build next. What you build is yours: flows and modules stay when the beta ends.