Every WHEN, ONLY IF and DO block in Cubevate, and every blank you can use in your text. Use the search box to find a block by name.
How to read this page
Every event is built from three kinds of blocks. WHEN wakes the bot up, ONLY IF checks something, and DO makes the bot act. Each table below lists the blocks by the group they belong to in Cubevate.
WHEN blocks
There are 37 WHEN blocks. An event has exactly one.
🤖 The bot
Block
What it does
The bot wakes up
Happens when your bot turns on (once for every server it is in).
Every so often
Repeats again and again, like an alarm clock.
Every day at a time
Happens once a day at the time you choose (the time of the computer running the bot).
My own mini-program
A named set of blocks that other blocks can start. Great when you use the same steps in many places.
The bot joins a new server
Happens when someone adds your bot to a server.
A feed has a new item
Follows an RSS or Atom feed and wakes up for every new item. Fill in the feed address, how often to check (not faster than every 5 minutes) and whether to also post the latest few items the first time. You can also pick a list box: every address in it is followed too. Blanks: {feed.title}, {item.title}, {item.link}, {item.summary}, {item.image}, {item.author} and {item.date}.
A Twitch streamer goes live
Checks Twitch every few minutes and wakes up when a streamer starts a live stream. Type one or more Twitch names (or pick a list box that holds them), how often to check and whether to announce streamers who are already live when the bot starts. Needs a free Client ID and Client Secret from dev.twitch.tv in my-secrets.txt. Blanks: {stream.name}, {stream.title}, {stream.game}, {stream.viewers}, {stream.url}, {stream.thumbnail}, {stream.avatar} and {stream.started}.
The bot leaves a server
Happens when your bot is removed from a server (kicked, banned or the server was deleted). The bot can not write there any more, so use this for notes and memory boxes. The server name is {server}.
💬 Chat messages
Block
What it does
Someone sends a message
Happens every time someone writes in a channel. (Tip: add an “Only if” block to look for words.)
Someone types a !command
The old-school way: someone types something like !hello in a channel. (Slash commands are the modern way.)
Someone edits a message
Happens when a message is changed after it was sent.
A message is deleted
Happens when a message is removed. The words may be missing if the message was old.
Someone adds an emoji to a message
Happens when someone clicks an emoji under a message.
Someone removes their emoji
Happens when someone un-clicks an emoji.
A message is pinned
Happens when someone pins a message. {user} is who pinned it, and {message}, {message.link} and {author.avatar} are about the pinned message.
🎛️ Commands & buttons
Block
What it does
Someone uses a /command
People type / and pick your command from a list. The easy and modern way to talk to a bot.
Someone clicks a button
Happens when someone clicks a button you put under a message. Use the same ID you gave the button.
Someone picks from a choice list
Happens when someone chooses something from a drop-down list you sent. Use {menu} to see what they picked.
Someone sends a form
Happens when someone fills in a pop-up form you showed them. Use {form.ID} to read the answers.
Someone right-clicks a person
Adds an item to the menu you get when you right-click a person (Apps). The person clicked on is {target}.
Someone right-clicks a message
Adds an item to the menu you get when you right-click a message (Apps).
👥 People
Block
What it does
Someone joins the server
Happens when a new person joins. Perfect for a welcome message!
Someone leaves the server
Happens when a person leaves (or is kicked).
Someone gets banned
Happens when a person is banned.
Someone gets un-banned
Happens when a ban is removed.
Someone gets a role
Happens when a person is given a role. The role is {role}.
Someone loses a role
Happens when a role is taken away from a person.
Someone changes their nickname
Use {old} and {new} for the old and new name.
Someone boosts the server
Happens when a person starts boosting your server.
Someone changes their online status
Online, away, busy or offline. Needs the “Presence” switch on the Discord page.
Someone is put in time-out
Happens when a person is put in time-out, or when a time-out is taken away early. {user} is the person. {new} says when the time-out ends and {old} is how many minutes are left.
🔊 Voice chat
Block
What it does
Someone joins a voice channel
The voice channel is {channel}.
Someone leaves a voice channel
Happens when a person disconnects from voice. The voice channel they left is {channel}.
Someone moves to another voice channel
Happens when a person jumps from one voice channel to another.
🏠 Server changes
Block
What it does
A channel is made
The new channel is {channel}.
A channel is deleted
Its old name is {old}.
A role is made
The new role is {role}.
A role is deleted
The old role name is {role.name}.
An emoji is added to the server
The new emoji is {emoji}.
An invite link is made
The link is {invite}.
A thread is started
Happens when a new thread (a little side-chat) is made.
A server event is planned
The event name is {old}.
A forum post is created
Happens when somebody starts a new post in a Forum channel. {user} is the person who posted and {channel.name} is the post title. You can limit it to one forum.
An invite link is deleted
Happens when an invite link is removed. The link was {invite}.
A server event starts or ends
Happens when a planned server event begins (or is over). The event name is {old} and {new} is its link.
A channel is changed
Happens when a channel gets a new name or a new topic. {channel} is the channel, {old} is what it was and {new} is what it is now. Changes your own bot made a moment ago are skipped, so it can not go in circles.
A thread is changed
Happens when a thread or forum post is renamed, closed, reopened, locked or unlocked. {thread} is the thread, {old} is the old name and {new} the new one.
A role is changed
Happens when a role gets a new name, colour or powers. {role} is the role, {old} is the old name and {new} the new one.
The server is changed
Happens when the server gets a new name or a new picture. {old} is the old name and {new} the new one.
AutoMod catches something
Happens when Discord’s own AutoMod blocks or flags a message. {user} is the person, {automod.rule} is the rule, {automod.word} is what it caught and {automod.text} is what they wrote. The bot needs the Manage Server permission to hear about it.
ONLY IF blocks
There are 49 ONLY IF blocks. An event can have as many as you like. All of them must be true. Right-click a block to flip it into “if NOT”.
👤 About a person
Block
What it does
Has a role
Checks if a person has a certain role.
Is a bot
Checks if the person is a bot (not a human).
Is allowed to…
Checks if a person has a power, like deleting messages.
Is the server owner
Checks if the person owns the server.
Is boosting the server
Checks if the person boosts the server.
Is one exact person
Checks if it is a very specific person (by their ID number).
Account age
How old their Discord account is. Great against fake accounts!
Time in the server
How long they have been in your server.
Is in a voice channel
Checks if a person is talking in voice chat.
Is in time-out
Checks if the person is currently in time-out.
Has their own profile picture
Checks if the person picked a profile picture. The plain default picture is common for fake or throw-away accounts.
💬 About the message
Block
What it does
Has certain words
Checks if the message has any of the words you list.
Starts with
Checks how the message begins.
Ends with
Checks how the message ends.
Is exactly
The whole message is exactly this.
Has a web link
Checks if the message has a link (http…).
Has a Discord invite
Checks for discord.gg invite links.
Has a file or picture
Checks if a picture or file was attached.
Has a picture, video or sound
Checks what kind of file or link is in the message. Perfect for picture-only or video-only channels. Note: Discord treats GIFs as videos, so a GIF is not a picture here.
Is a command
Checks if the message is a bot command: starts with a command sign like ! . ? $ or is the answer to a /command. Perfect for commands-only channels.
Pings someone
Checks if the message pings (@) someone.
Pings many people
Counts the pings. Good against spam.
Length of the message
How many letters the message has.
SHOUTING (lots of capitals)
Checks if most letters are CAPITAL. Ignores short messages.
Too many emoji
Counts the emoji in the message.
Repeating letters (spam)
Catches things like “aaaaaaaaaaaa” or “lollollollol”.
Is a reply
Checks if the message answers another message.
Matches a pattern (advanced)
For experts: a “regular expression” pattern.
Has a sticker
Checks if the message has a Discord sticker in it.
Is a reply to this bot
Checks if the message is a reply to something this bot wrote. Great for bots that chat back.
📍 About the place
Block
What it does
Is in a channel
Checks which channel it happened in.
Is in a category
Checks if the channel is inside a category (a folder of channels).
Voice channel is empty
Checks that nobody is inside a voice channel. Perfect for removing temporary channels.
Channel is age-restricted
Checks if the channel is marked 18+.
Is inside a thread
Checks if it happened in a thread.
Channel type
Checks what kind of channel it happened in: a text channel, voice chat, announcement channel, thread or stage.
Number of people in the server
Compares how many people the server has.
Is inside a forum post
Checks if it happened inside a post of a Forum channel (not a normal thread).
Forum post has a tag
Checks if the forum post it happened in has a certain tag, like “Solved” or “Open”.
🧠 Memory & numbers
Block
What it does
Compare two things
Compare any two values. You can use {blanks} like {memory.coins} or {option.amount}.
Check a memory box
Looks inside one of your memory boxes.
A list box contains
Checks if a list box has a certain item.
🎲 Luck, time & waiting
Block
What it does
Random chance
Like rolling a dice. 50% means “half of the time”.
Time of day
Only between two times (of the computer running the bot).
Day of the week
Only on certain days.
Slow down (cooldown)
Makes people wait between uses so they can’t spam. The first time it works, then they must wait.
🔁 Repeat & otherwise
Block
What it does
Otherwise
Runs when the block just above did NOT happen. (Only inside a “sub-event”.)
Do it many times
Repeats everything inside this block. Use {loop} for the counting number (1, 2, 3…).
Do it for each person
Repeats for every person (or everyone with a role). Use {each} to mention the current person.
A note for me
Just a sticky note between your conditions. It does nothing when the bot runs — it helps you remember what is going on.
My own code says yes
Advanced: write a few lines of code that give back true (yes) or false (no).
Do it for each item in a list
Repeats everything inside for every item of a list box, or of a list you type with commas. Use {loop.item} for the current item and {loop} for its position (1, 2, 3…).
Do it for each letter
Repeats everything inside for every letter of a text (great for word games). Use {loop.item} for the current letter and {loop} for its position (1, 2, 3…).
DO blocks
There are 65 DO blocks. They run from top to bottom.
💬 Send & manage messages
Block
What it does
Send a message
Writes a message. Add buttons if you want!
Send a fancy box (embed)
A pretty message box with a title, colour and pictures.
Show a list of all my /commands
Posts a neat help list of every /command your bot has. It is built automatically: add a new command and it shows up in the list by itself.
Send a choice list
A drop-down list people can pick from. Make a “Someone picks from a choice list” block to react.
Send a private message (DM)
Writes to one person privately. It is skipped if they turned private messages off.
Change a fancy box I sent
Rewrites a fancy box (embed) that already exists — like a pet card or a game that updates itself. Leave the message empty to change the one that was clicked.
Change the message I just sent
Edits the last message this block sent.
Delete a message
Removes a message. Empty = the message that started this.
Clear many messages
Deletes the newest messages in a channel (not older than 14 days).
Add an emoji under a message
Sticks an emoji reaction to a message.
Remove all emoji from a message
Cleans all reactions off a message.
Pin a message
Pins a message to the top of the channel.
Publish an announcement
In an announcement channel, this publishes the message to every server that follows the channel.
Copy a message to another channel
Sends a copy of a message to another channel: who wrote it, what it said, any picture and a link back to the original. Perfect for reports and highlights.
Un-pin a message
Removes a pin.
Start a poll
People vote with clicks.
Show a pop-up form
Pops up a little form with questions. Must be the FIRST thing in a /command or button block. When they send it, the “Someone sends a form” block wakes up.
Switch buttons off or on
Greys out buttons under a message so they can not be clicked any more (or wakes them up again). Leave the IDs empty for all the buttons.
👥 People
Block
What it does
Give a role
Gives a role to a person. (My own role must be ABOVE this role in the list.)
Take a role away
Removes a role from a person.
Flip a role on/off
Gives the role if they don’t have it, takes it if they do. Great for role buttons! ({temp.toggled} says added or removed.)
Kick someone
Sends a person out of the server. They can come back with a new invite.
Ban someone
Removes a person and stops them from coming back.
Un-ban someone
Lets a banned person return. Needs their ID number.
Put someone in time-out
They can’t write or talk for a while.
End a time-out
Lets them talk again.
Change a nickname
Changes how a person’s name looks in this server. Leave it empty to reset.
Move to another voice channel
Moves a person who is in voice chat.
Kick out of voice chat
Disconnects a person from voice.
Mute / un-mute in voice
Mutes a person in voice chat (for everybody).
#️⃣ Channels
Block
What it does
Close a thread
Hides (archives) the thread this happened in, and can lock it too. Good for finished help requests.
Make a channel
Creates a new channel. Use {newchannel} afterwards to mention it.
Limit people in a voice channel
Sets the most people that can be in a voice channel. 0 means no limit.
Delete a channel
Removes a channel for good.
Rename a channel
Gives a channel a new name.
Change a channel’s description
Changes the little text at the top of a channel.
Set slow mode
People must wait between messages. 0 turns it off.
Lock a channel
Nobody (in the role) can write there any more.
Unlock a channel
Lets people write there again.
Change who can do what in a channel
Allow or block one power in one channel for a role or person.
Start a thread
Makes a little side-chat. Use {thread} to mention it.
Make an invite link
Makes a link to join the server. Use {invite} to show it.
Start a forum post
Makes a new post in a Forum channel, with a title, a first message and (optionally) tags. Use {thread} to mention it afterwards.
Change this thread or forum post
Renames, locks, unlocks, closes, reopens, pins, unpins or deletes the thread (or forum post) this happened in.
Change forum post tags
Adds, removes or replaces the tags of the forum post this happened in. Great for “Open” / “Solved” systems.
Add someone to this thread
Adds a person to the thread or forum post this happened in, so they get notified.
🏷️ Roles & server
Block
What it does
Make a role
Creates a role. Use {newrole} afterwards to mention it.
Delete a role
Removes a role for good.
Change a role
Renames a role or changes its colour.
Rename the server
Gives the server a new name.
Change the bot’s status
The little text under the bot’s name, like “Playing a game”.
Add an emoji to the server
Makes a new server emoji from a picture on the web.
🧠 Memory boxes
Block
What it does
Put something in a memory box
Replaces what is in a box. You can do math: {memory.coins} + 5
Add to a number box
Makes a number box bigger.
Take away from a number box
Makes a number box smaller.
Add to a list box
Adds one item to the end of a list.
Remove from a list box
Takes an item out of a list.
Reset a memory box
Puts the box back to its starting value.
Show a top list (leaderboard)
Shows who has the most in a “one for each person” number box.
Look inside or sort a list box
Reads the first or last item, finds a position, counts, sorts, mixes or tidies a list box. Answers go on a sticky note you read with {temp.NAME}.
Find someone’s place in a top list
Looks up the rank of a person in a “one for each person” number box (1 = the most). Read it with {temp.NAME}; {temp.NAME_of} says how many people are on the list.
🧰 Waiting, stopping & extras
Block
What it does
Wait a bit
Pauses this block for a while before the next step.
Stop here
Ends this block right now. Nothing below it happens.
Run a mini-program
Starts one of your “My own mini-program” blocks.
Pick a random number
Like rolling a dice. The answer is saved on a sticky note: read it with {temp.NAME}.
Pick one thing at random
Gives you one item from a list you type, separated by commas. Saved on a sticky note: read it with {temp.NAME}.
Pick one from a list box
Takes a random item out of one of your list boxes (like giveaway entrants). Read it with {temp.NAME}; {temp.NAME_count} says how many were in the list.
Remember something for a moment
A sticky note that is thrown away when the block ends. Read it with {temp.NAME}.
Get something from the internet
Asks a website for information. Read the answer with {web}. (Advanced)
Write a note in the bot’s window
Prints a line in the black window where your bot runs. Good for testing.
A note for me
Just a sticky note between your actions. It does nothing when the bot runs — it helps you remember what is going on.
Run my own code
Advanced: write your own JavaScript. You get ctx (what happened), client (the bot), memory, fill and sleep.
Change or measure a text
Makes a sticky note out of a text: CAPITALS, small letters, how long it is, replace a word, take one letter, hide letters and more. Read the answer with {temp.NAME}.
If an action fails, keep going
Normally, when one action fails (a missing role, closed private messages…), the rest of the event is skipped. Put this block first and the actions after it carry on. {temp.error} then holds the last problem in plain words.
Run a mini-program later
Starts one of your “My own mini-program” blocks after some time: minutes, hours or even days. Unlike “Wait a bit”, this is written down in the bot’s memory, so it still happens after the bot restarts.
Note: Some blocks need a power (permission) in Discord, like Manage Roles or Kick Members. Cubevate tells you which ones your bot needs on the Finish & host page, in step 3 (“Why does my bot need these powers?”).
Blanks you can put in any text
A blank is a word in curly brackets. When your bot runs, it is replaced with the real thing. In any text box press Add info ({ }) to pick one.
The person
Blank
What it becomes
{user}
Pings the person
{user.name}
Their name (no ping)
{user.id}
Their ID number
{user.avatar}
Link to their picture
{user.joined}
The day they joined the server
{user.created}
The day their account was made
{user.roles}
How many roles they have
{user.rolelist}
Their roles (clickable)
{author}
Writer of the message (for emoji events)
{target}
The person you right-clicked
The server & the place
Blank
What it becomes
{server}
Server name
{server.members}
How many people are in the server
{server.humans}
How many humans (no bots)
{server.bots}
How many bots
{server.channels}
How many channels
{server.textchannels}
How many text channels
{server.voicechannels}
How many voice channels
{server.categories}
How many categories
{server.roles}
How many roles
{server.emojis}
How many emojis
{server.boosts}
How many boosts
{server.created}
The day the server was made
{commands}
A list of all my /commands
{channel}
The channel (clickable)
{channel.name}
Name of the channel
{role}
The role involved
{role.name}
Name of that role
The message
Blank
What it becomes
{message}
The words that were written
{message.link}
Link to the message
{message.image}
First picture attached to the message
{author.avatar}
Picture of the message writer
{reaction.count}
How many times this emoji was used (emoji events)
{emoji}
The emoji used
{arg.1}
1st word after a !command
{args}
Everything after a !command
Answers from people
Blank
What it becomes
{menu}
What was picked in a choice list
{button}
ID of the clicked button
Dates, luck & other things
Blank
What it becomes
{random:1-100}
A random number
{pick:red|blue|green}
Picks one at random
{date}
Today’s date
{today.md}
Today as month/day, like 3/14
{today.month}
This month (1-12)
{today.day}
Today’s day number
{time}
The time now
{now}
The time now as a number (seconds), for math
{timestamp}
A date Discord shows in each person’s own time zone
{timestamp.relative}
“5 minutes ago” style
{loop}
Counting number inside a repeat
{each}
Current person in a “for each person”
{web}
Answer from the internet
{newchannel}
The channel just made
{newrole}
The role just made
{invite}
The invite link just made
{old}
The old value (edits, nicknames)
{new}
The new value
{memory.coins}
What is inside your memory box named coins (use your own box name)
Tip: Blanks only work where they make sense. {reaction.count} works in emoji events, {arg.1} in !command events, and {menu} after a choice list.
Cookies, but cute
We use a few cookies to make this site work and, if you say yes, to see how it is used so we can make it better. You are in control. Privacy policy
Cookie settings
Pick which cookies you are happy with. You can change your mind at any time.