Skip to content

Blocks

These are the blocks that ship with Makecord. This page is generated from the blocks themselves, so it always matches the version you’re reading about.

Any text setting can contain variables.

Triggers

Start

Where the flow begins when its command or event fires.

core.triggerCommand and event flowsOutputs: next

No settings.

Actions

Reply

Replies to the command, button, menu or form that started the flow.

core.replyCommand and event flowsOutputs: next

FieldTypeDefaultDescription
contentstring""Use variables like {{user.displayName}}
messagestring""Sends a design from messages/ instead of the text above
ephemeralbooleanfalse

Defer Reply

Tells Discord the answer is coming, for steps that take longer than 3 seconds.

core.deferReplyCommand and event flowsOutputs: next

FieldTypeDefaultDescription
ephemeralbooleanfalse

Send Message

Sends a message to a channel.

core.sendMessageCommand and event flowsOutputs: next

FieldTypeDefaultDescription
channelIdrequiredstring—For example {{channel.id}}
contentstring""Use variables like {{user.displayName}}
messagestring""Sends a design from messages/ instead of the text above

Send DM

Sends a direct message to a user. Fails if they don't accept DMs.

core.sendDMCommand and event flowsOutputs: next, failed

FieldTypeDefaultDescription
userIdstring"{{user.id}}"For example {{options.user}}
contentstring""Use variables like {{user.displayName}}
messagestring""Sends a design from messages/ instead of the text above

Update Message

Changes the message whose button or menu was used, like a vote count or a next page.

core.updateMessageCommand and event flowsOutputs: next

FieldTypeDefaultDescription
contentstring""Use variables like {{user.displayName}}
messagestring""Sends a design from messages/ instead of the text above

Add Reaction

Reacts to a message with an emoji.

core.addReactionCommand and event flowsOutputs: next

FieldTypeDefaultDescription
emojirequiredstring—A unicode emoji, or a custom one as name:id
channelIdstring"{{channel.id}}"
messageIdstring"{{message.id}}"

Delete Message

Deletes a message. The bot needs the Manage Messages permission for other people's messages.

core.deleteMessageCommand and event flowsOutputs: next

FieldTypeDefaultDescription
channelIdstring"{{channel.id}}"
messageIdstring"{{message.id}}"

Add Role

Gives a member a role. The bot needs the Manage Roles permission.

core.addRoleCommand and event flowsOutputs: next

FieldTypeDefaultDescription
roleIdrequiredstring—
userIdstring"{{user.id}}"For example {{options.user}}

Remove Role

Takes a role away from a member. The bot needs the Manage Roles permission.

core.removeRoleCommand and event flowsOutputs: next

FieldTypeDefaultDescription
roleIdrequiredstring—
userIdstring"{{user.id}}"For example {{options.user}}

Kick Member

Removes a member from the server. They can join again with an invite.

core.kickCommand and event flowsOutputs: next

FieldTypeDefaultDescription
userIdstring"{{user.id}}"For example {{options.user}}
reasonstring""Shown in the audit log

Ban Member

Bans a user from the server.

core.banCommand and event flowsOutputs: next

FieldTypeDefaultDescription
userIdstring"{{user.id}}"For example {{options.user}}
reasonstring""Shown in the audit log
deleteMessageHoursstring"0"0 to 168

Timeout Member

Mutes a member for a while. Use 0 minutes to lift a timeout.

core.timeoutCommand and event flowsOutputs: next

FieldTypeDefaultDescription
userIdstring"{{user.id}}"For example {{options.user}}
minutesstring"10"Up to 40320 (28 days)
reasonstring""Shown in the audit log

Show Form

Opens a form (modal). Handle the answers in a Form submitted event flow with the same ID.

core.showModalCommand and event flowsOutputs: next

FieldTypeDefaultDescription
customIdrequiredstring—Matches the Form submitted flow, e.g. feedback
titlerequiredstring—
inputsrequiredstring—One per line: id | Label | short or paragraph | required or optional. Up to 5

Reply to Message

Replies to a message in its channel, like a member would. Works in message events.

core.replyToMessageCommand and event flowsOutputs: next

FieldTypeDefaultDescription
channelIdstring"{{channel.id}}"For example {{channel.id}}
messageIdstring"{{message.id}}"For example {{message.id}}
contentstring""Use variables like {{user.displayName}}
messagestring""Sends a design from messages/ instead of the text above
mentionbooleantrue

Edit Message

Changes a message the bot sent earlier.

core.editMessageCommand and event flowsOutputs: next

FieldTypeDefaultDescription
channelIdstring"{{channel.id}}"For example {{channel.id}}
messageIdstring"{{message.id}}"For example {{message.id}}
contentstring""Use variables like {{user.displayName}}
messagestring""Sends a design from messages/ instead of the text above

Pin Message

Pins or unpins a message.

core.pinMessageCommand and event flowsOutputs: next

FieldTypeDefaultDescription
action"pin" | "unpin""pin"
channelIdstring"{{channel.id}}"For example {{channel.id}}
messageIdstring"{{message.id}}"For example {{message.id}}

Delete Recent Messages

Deletes up to 100 recent messages in a channel. Messages older than 14 days are skipped.

core.purgeMessagesCommand and event flowsOutputs: next

FieldTypeDefaultDescription
channelIdstring"{{channel.id}}"For example {{channel.id}}
amountstring"10"1 to 100
fromUserstring""Leave empty to delete from everyone
variablestring"deleted"Read it later as {{vars.name}}

Remove Reactions

Removes reactions from a message: all of them, one emoji, or one person's.

core.removeReactionsCommand and event flowsOutputs: next

FieldTypeDefaultDescription
channelIdstring"{{channel.id}}"For example {{channel.id}}
messageIdstring"{{message.id}}"For example {{message.id}}
emojistring""Leave empty to remove every reaction
userIdstring""With an emoji, removes just this person's reaction

Create Thread

Starts a thread in a channel, or on a message if you give one.

core.createThreadCommand and event flowsOutputs: next

FieldTypeDefaultDescription
channelIdstring"{{channel.id}}"For example {{channel.id}}
messageIdstring""Optional. For example {{message.id}}
namerequiredstring—
archiveAfter"60" | "1440" | "4320" | "10080""1440"
variablestring"threadId"Read it later as {{vars.name}}

Send Poll

Posts a Discord poll in a channel.

core.sendPollCommand and event flowsOutputs: next

FieldTypeDefaultDescription
channelIdstring"{{channel.id}}"For example {{channel.id}}
questionrequiredstring—
answersrequiredstring—One per line, up to 10. Start a line with an emoji to show it
hoursstring"24"1 to 768
multiplebooleanfalse

Set Nickname

Changes a member's nickname in the server. Leave it empty to reset.

core.setNicknameCommand and event flowsOutputs: next

FieldTypeDefaultDescription
userIdstring"{{user.id}}"For example {{options.user}}
nicknamestring""Up to 32 characters
reasonstring""Shown in the audit log

Unban Member

Lifts a ban so the user can join again.

core.unbanCommand and event flowsOutputs: next

FieldTypeDefaultDescription
userIdrequiredstring—
reasonstring""Shown in the audit log

Move in Voice

Moves a member to another voice channel, or disconnects them.

core.moveVoiceCommand and event flowsOutputs: next

FieldTypeDefaultDescription
userIdstring"{{user.id}}"For example {{options.user}}
channelIdstring""Leave empty to disconnect

Create Role

Creates a role in the server.

core.createRoleCommand and event flowsOutputs: next

FieldTypeDefaultDescription
namerequiredstring—
colorstring""Hex, like #5865f2. Optional
hoistbooleanfalse
mentionablebooleanfalse
variablestring"roleId"Read it later as {{vars.name}}

Delete Role

Deletes a role from the server.

core.deleteRoleCommand and event flowsOutputs: next

FieldTypeDefaultDescription
roleIdrequiredstring—Right-click a role with Developer Mode on to copy its ID
reasonstring""Shown in the audit log

Create Channel

Creates a text, voice, announcement or forum channel, or a category.

core.createChannelCommand and event flowsOutputs: next

FieldTypeDefaultDescription
namerequiredstring—
kind"text" | "voice" | "category" | "announcement" | "forum" | "stage""text"
parentIdstring""Optional
topicstring""Optional
privatebooleanfalse
variablestring"channelId"Read it later as {{vars.name}}

Delete Channel

Deletes a channel or thread.

core.deleteChannelCommand and event flowsOutputs: next

FieldTypeDefaultDescription
channelIdstring"{{channel.id}}"For example {{channel.id}}
reasonstring""Shown in the audit log

Edit Channel

Renames a channel or changes its topic or slowmode. Empty fields stay as they are.

core.editChannelCommand and event flowsOutputs: next

FieldTypeDefaultDescription
channelIdstring"{{channel.id}}"For example {{channel.id}}
namestring""
topicstring""
slowmodestring""0 to 21600. Empty keeps it

Lock Channel

Stops @everyone from sending messages in a channel, or lets them again.

core.lockChannelCommand and event flowsOutputs: next

FieldTypeDefaultDescription
action"lock" | "unlock""lock"
channelIdstring"{{channel.id}}"For example {{channel.id}}
reasonstring""Shown in the audit log

Create Invite

Creates an invite link for a channel.

core.createInviteCommand and event flowsOutputs: next

FieldTypeDefaultDescription
channelIdstring"{{channel.id}}"For example {{channel.id}}
hoursstring"24"0 never expires
maxUsesstring"0"0 is unlimited
variablestring"invite"Read it later as {{vars.name}}

Set Bot Status

Sets the bot's online status and the activity under its name.

core.setPresenceCommand and event flowsOutputs: next

FieldTypeDefaultDescription
status"online" | "idle" | "dnd" | "invisible""online"
activity"none" | "custom" | "playing" | "listening" | "watching" | "competing""custom"
textstring""For example {{client.servers}} servers

Suggest Choices

Answers autocomplete with up to 25 suggestions for what the person is typing.

core.suggestCommand and event flowsOutputs: next

FieldTypeDefaultDescription
choicesrequiredstring—One per line as Label | value, or a variable holding a list
filterbooleantrue

Logic

Condition

Compares two values and branches into true or false.

core.conditionCommand and event flowsOutputs: true, false

FieldTypeDefaultDescription
leftrequiredstring—
operator"equals" | "notEquals" | "contains" | "greaterThan" | "lessThan""equals"
rightrequiredstring—

Wait

Pauses the flow. In a command, longer waits defer the reply automatically.

core.waitCommand and event flowsOutputs: next

FieldTypeDefaultDescription
secondsstring"1"Up to 900

Repeat

Runs the loop branch a number of times, then continues with done. Connect the end of the loop back to this block.

core.repeatCommand and event flowsOutputs: loop, done

FieldTypeDefaultDescription
timesstring"3"Up to 100
indexVariablestring"i"1, 2, 3… as {{vars.i}}

Has Role

Checks whether a member has a role.

core.hasRoleCommand and event flowsOutputs: true, false

FieldTypeDefaultDescription
userIdstring"{{user.id}}"For example {{options.user}}
roleIdrequiredstring—Right-click a role with Developer Mode on to copy its ID

Has Permission

Checks whether a member has a permission in the server.

core.hasPermissionCommand and event flowsOutputs: true, false

FieldTypeDefaultDescription
userIdstring"{{user.id}}"For example {{options.user}}
permission"Administrator" | "ManageGuild" | "ManageRoles" | "ManageChannels" | "ManageMessages" | "KickMembers" | "BanMembers" | "ModerateMembers" | "ManageNicknames" | "MentionEveryone" | "MoveMembers" | "ManageThreads""ManageMessages"

For Each

Runs the loop branch once for every item in a list, then continues from done.

core.forEachCommand and event flowsOutputs: loop, done

FieldTypeDefaultDescription
listrequiredstring—A variable holding a list, like {{vars.items}}, or lines of text
itemVariablestring"item"Read it later as {{vars.name}}
indexVariablestring"index"Read it later as {{vars.name}}

Cooldown

Lets a flow continue only once per period for each key, like per user.

core.cooldownCommand and event flowsOutputs: next, cooling

FieldTypeDefaultDescription
secondsstring"10"
keystring"{{user.id}}"{{user.id}} limits each person separately
variablestring"remaining"Read it later as {{vars.name}}

Data

Set Variable

Stores a value you can read later in the flow as {{vars.name}}.

core.setVariableCommand and event flowsOutputs: next

FieldTypeDefaultDescription
namerequiredstring—
valuerequiredstring—

Random Number

Picks a whole number between min and max, both included.

core.randomCommand and event flowsOutputs: next

FieldTypeDefaultDescription
minstring"1"
maxstring"6"
variablestring"random"Read it later as {{vars.name}}

Math

Calculates with two numbers.

core.mathCommand and event flowsOutputs: next

FieldTypeDefaultDescription
leftrequiredstring—
operator"add" | "subtract" | "multiply" | "divide" | "modulo" | "power" | "min" | "max""add"
rightrequiredstring—
variablestring"result"Read it later as {{vars.name}}

Text

Changes or measures a piece of text.

core.textCommand and event flowsOutputs: next

FieldTypeDefaultDescription
operation"uppercase" | "lowercase" | "trim" | "length" | "replace" | "split""lowercase"
inputrequiredstring—
findstring""For replace and split
replaceWithstring""For replace
variablestring"text"Read it later as {{vars.name}}

HTTP Request

Calls a web API. JSON answers can be read like {{vars.response.field}}.

core.httpRequestCommand and event flowsOutputs: next, error

FieldTypeDefaultDescription
method"GET" | "POST" | "PUT" | "PATCH" | "DELETE""GET"
urlrequiredstring—
bodystring""For POST, PUT and PATCH
variablestring"response"Read it later as {{vars.name}}

Read Value

Reads a saved value into a variable. Saved values survive restarts.

core.storeGetCommand and event flowsOutputs: next

FieldTypeDefaultDescription
keyrequiredstring—For example xp:{{user.id}}
fallbackstring""Used when nothing is saved under the key
variablestring"value"Read it later as {{vars.name}}

Save Value

Saves a value under a key, kept across restarts.

core.storeSetCommand and event flowsOutputs: next

FieldTypeDefaultDescription
keyrequiredstring—For example xp:{{user.id}}
valuerequiredstring—

Increase Value

Adds to a saved number (missing counts as 0) and stores the new total in a variable.

core.storeIncrementCommand and event flowsOutputs: next

FieldTypeDefaultDescription
keyrequiredstring—For example xp:{{user.id}}
bystring"1"Negative numbers decrease it
variablestring"total"Read it later as {{vars.name}}

Delete Value

Removes a saved value.

core.storeDeleteCommand and event flowsOutputs: next

FieldTypeDefaultDescription
keyrequiredstring—

Log

Writes a line to the IDE's Run panel, or to the server console.

core.logCommand and event flowsOutputs: next

FieldTypeDefaultDescription
level"debug" | "info" | "warn" | "error""info"
messagerequiredstring—

Get Message

Loads a message and saves its text, author and link in a variable.

core.getMessageCommand and event flowsOutputs: next, notFound

FieldTypeDefaultDescription
channelIdstring"{{channel.id}}"For example {{channel.id}}
messageIdstring"{{message.id}}"For example {{message.id}}
variablestring"msg"Read it later as {{vars.name}}

Get Member

Loads a server member and saves their name, roles and dates in a variable.

core.getMemberCommand and event flowsOutputs: next, notFound

FieldTypeDefaultDescription
userIdstring"{{user.id}}"For example {{options.user}}
variablestring"member"Read it later as {{vars.name}}

Timestamp

Makes a time Discord shows in each reader's own time zone, like "in 2 hours".

core.timestampCommand and event flowsOutputs: next

FieldTypeDefaultDescription
timestring"now"now, an ISO date like {{member.joinedAt}}, or a Unix time
addMinutesstring"0"Can be negative
style"relative" | "shortTime" | "longTime" | "shortDate" | "longDate" | "shortDateTime" | "longDateTime""relative"
variablestring"time"Read it later as {{vars.name}}

Random Item

Picks one item from a list at random.

core.randomItemCommand and event flowsOutputs: next

FieldTypeDefaultDescription
listrequiredstring—One per line, or a variable holding a list
variablestring"pick"Read it later as {{vars.name}}