Piecewise
Build chat bots with blocks
Home
new line
In the toolbox
Inserts a new line.
Output
String
Prev - load table from file (file)
Next - parse date from text (text)
Home
Tutorials
+
Backpacks
Creating Custom Blocks (Legacy)
Creating Custom Themes
Frequently Asked Questions
Paginators
Persistent data
Plugins
Sharing Blocks
Steam Deck
Steam Workshop
Using Matrix Encryption
Using the aimer branch
Your First Bot
Discord
+
(action) permission (permission) to/from role (role)
(item) mentioned in message (message)
(obj1) is (obj2)
(operation) message (message)
(operation) role (role) to/from user (user)
(operation) thread (channel)
(operation) thread (thread)
(operation) user (user) in server (guild)
(operation) user (user) to/from thread (thread)
(permission)
(property) of channel (channel)
(property) of emoji (emoji)
(property) of role (role)
(property) of scheduled event (schevent)
(property) of server (guild)
(property) of sticker (sticker)
(property) of user (user)
(property) time of scheduled event (schevent)
(property) uses of invite (invite)
(type) argument # (argNum)
(type) event
all channels in server (guild)
all invites for server (guild)
approximate number of members in server (guild)
arguments
attachment with location (attachment)
attachments of message (message)
author of message (message)
author with name (name) with image (image) with URL (url)
ban user (user) from server (guild) with reason (reason)
channel (channel) is (type)
clear activity
content of message (message)
create (privacy) event of type (type) in server (guild) with name (name) with description (description) starting at (start) ending at (end) in voice channel (channel) at location (location)
create (type) channel with name (name) in server/category (parent)
create (type) channel with name (name) in server/category (parent)
create emoji with name (name) in server (guild) with file (location_resolvable)
create invite to channel (channel) probationary? (temporary) re-use similar existing invite? (not_unique) time until expiry (max_age) maximum # of uses (max_uses)
create role in server (server) with name (name) with color (color) position (position) hoisted? (hoisted) mentionable? (mentionable)
create server with name (name) with icon (image)
create server with name (name) with icon (image)
create sticker in server (guild) with name (name) with image (image) represented by emoji (emoji)
create sticker in server (guild) with name (name) with image (image) represented by emoji (emoji)
create thread with name (name) in channel (channel) archive after (archivetime)
create thread with name (name) in channel (channel) archive after (archivetime)
custom ID of interaction (interaction)
delete channel (channel)
delete emoji (emoji)
delete role (role)
delete scheduled event (schevent)
delete server (guild)
delete sticker (sticker)
edit role (role) with name (name) with color (color) with position (position) hoisted? (hoisted) mentionable? (mentionable)
events scheduled in server (guild)
fetch message (message) references
fetch message with ID (id) in channel (channel)
find channel in server (guild) with name (name)
find channel with ID (channel)
find emoji in server (guild) with name (name)
find emoji with ID (id)
find emoji with Unicode character (unicode)
find role in server (guild) with ID (id)
find role in server (guild) with name (name)
find server with ID (id)
find server with name (name)
find sticker with ID (id)
find user with ID (userid)
ID of message (message)
invite (invite) is temporary
kick user (user) from server (guild) with reason (reason)
leave server (guild)
log on (token) (ignore_me) ignore my own actions (ignore_bots) ignore other bots (ignore_system) ignore system messages (request_presence_intent) request presence intent (request_members_intent) request members intent
me
message (message) (property)
message (message) has reaction with emoji (emoji)
message (message) mentions (target)
message (message) mentions @everyone
number of Nitro boosters in server (guild)
number of reactions on message (message) with emoji (emoji)
on chat command named (name) with minimum # of parameters (count) do (statements) (dms) also in DMs
origin channel of message (message)
origin server of message (message)
owner of bot
owner of server (guild)
parent channel of (channel)
parent server of channel (channel)
pinned messages in channel (channel)
play audio at location (sound) in channel (channel)
react to message (message) with emoji (emoji)
remove all reactions on message (message)
remove all reactions on message (message) from user (user)
remove time out from user (user) in server (guild) with reason (reason)
resolve invite from URL/code (invite)
rich embed with title (title) with description (description) with URL (url) with author (author) with image URL (image_url) with thumbnail URL (thumbnail_url) with color (color) with footer (footer) with footer logo (footer_logo) with timestamp (timestamp)
roles in server (server)
roles user (user) has in server (guild)
send embed paginator to channel (target) with content (content) with pages (pages) with next emoji (next) with previous emoji (previous) with timeout (timeout)
send message to (to) with content (content) with components (interaction) as (as) (suppress_embeds) suppress embeds
send message to (to) with content (content) with components (interaction) as (as) (suppress_embeds) suppress embeds
server (guild) is available
server that owns sticker (sticker)
servers I am in
set activity to (activity) (name)
set my status to (activity)
set nickname of user (user) in server (server) to (nickname)
set slow mode on channel (channel) to time (time) with reason (reason)
start typing in channel (channel)
stop sound
target channel of invite (invite)
target server of invite (invite)
time message (message) sent
time out user (user) for length (time) in server (guild) with reason (reason)
timeout end time for user (user) in server (guild)
unban user (user) from server (guild) with reason (reason)
URL of invite (invite)
URL of message (message)
user (user) has role (role)
user (user) is (property) in server (guild)
user (user) is (status) in server (guild)
user (user) is banned from server (guild)
user (user) is bot
user (user) is bot owner
user (user) is in server (guild)
user (user) is timed out in server (guild)
user or role (userOrRole) can (permission) in (target)
users banned from server (guild)
users in voice channel (channel)
users that reacted to message (message) with emoji (emoji)
wait for message in channel (channel) from user (user) time out after (timeout)
📄 for each member of server (guild) as (VAR)
📄 for each message in channel (channel) as (VAR)
🔔 channel
🔔 emoji
🔔 interaction
🔔 message
🔔 message before edit
🔔 server
🔔 user
🗣️ (operation) interaction with content (content) with component (interaction) ephemeral (ephemeral) suppress embeds (suppress_embeds)
🗣️ (required) required (type) option with name (name) description (description)
🗣️ (type) input with label (label) with ID (id) with placeholder (placeholder) with minimum length (min) with maximum length (max) with initial value (initial) (required) required?
🗣️ create interactible button with label (label) color (type) emoji (emoji) enabled? (enabled) do (statements)
🗣️ create interactible button with label (label) color (type) emoji (emoji) enabled? (enabled) with custom ID (id)
🗣️ create interactible dropdown with items (values) maximum selection count (maxValues) minimum selection count (minValues) placeholder (placeholder) enabled? (enabled) do (statements)
🗣️ create interactible dropdown with items (values) maximum selection count (maxValues) minimum selection count (minValues) placeholder (placeholder) enabled? (enabled) with custom ID (id)
🗣️ defer interaction response
🗣️ get (type) option with name (argument)
🗣️ reply to interaction with modal titled (title) with fields (fields) do (do)
🗣️ selected dropdown values
🗣️ target of context menu command
🗣️ value of modal field with ID (id)
🗣️ when (type) with name (name) description (description) in server (guild) with options (args) do (do)
[deprecated] # reactors on (reaction)
[deprecated] get reaction on message (message) with emoji (emoji)
[deprecated] reactors to reaction (reaction)
[deprecated] user (user) can (permission) in (target)
[deprecated] 🔔 reaction
🔔 when (event) do (statement)
🗣️ (default) default option with name (name) value (value) description (description) emoji (emoji)
Internet
+
(method) URL (url) send (datatype) data (data) with headers (headers) parse response as (response)
fetch URL (url) as (type) table
parse text (string) as (type)
Lazurite
-
configure (ignore_errors) ignore errors
stop
[deprecated] pick random from list (array)
add (time) to date (date)
add (value) to (property) of (array)
convert text (text) to number
create empty table
create table with pairs (pairs)
delete key (key) from table (table)
format text (text) with (values)
get key (key) from table (table)
keys of table (table)
list (array) contains (value)
load list from file (file)
load table from file (file)
new line
parse date from text (text)
print (print)
replace (needle) with (replacement) in (haystack)
reverse list (array)
save list (array) to file (file)
save table (table) to file (file)
set (VAR) to (value) in this block set only
set key (key) to (value) in table (table)
table (table) contains key (key)
table pair with key (key) value (value)
text (haystack) contains (needle)
text (text) (starts_or_ends) with (prefix_or_suffix)
try (statements) 🔥 catch error as (error) (catch)
⏰ (count) (unit)
⏰ (property) of date (date)
⏰ after (time) do (statements)
⏰ create date in (timezone) with year (year) month (month) day (day) hours (hours) minutes (minutes) seconds (seconds)
⏰ every (when) do (statement)
⏰ now
⏰ stop
⏰ time elapsed between (time1) and (time2)
⏰ wait (time)
🔔 when (event) do (statement)
Mastodon
+
(interaction) status (status)
(interaction) user (user)
(property) count of user (user)
(property) of user (user)
(scope) scope
(type) content of status (status)
attachment with location (attachment)
attachments in status (status)
author of status (status)
delete status (status)
emoji of reaction (reaction)
emoji reactions on status (status)
get status with ID (localid)
handle of user (user)
I (state) user (user)
I voted on poll (poll)
ID of status (status)
initiator of notification (notification)
initiator of reaction (reaction)
instance maximum status length
items I voted for on poll (poll)
log on (token) (instance) (ignore_my_statuses) ignore my statuses in feeds (include_mentions) include mentions when replying
look up status with URL (apid)
look up user by handle (handle)
me
notification (notification) is (type)
number of votes for poll option (option) in poll (poll)
original author of status (status)
poll in status (status)
poll options in status (poll)
poll with options (options) expires in (expires) allow multiple choices? (multiple)
scope of status (status)
send status with content (content) spoiler/subject (spoiler) with scope (scope) in reply to (post) sensitive? (sensitive) as (format)
send status with content (content) spoiler/subject (spoiler) with scope (scope) in reply to (post) sensitive? (sensitive) as (format)
set my (field) to (name)
status (status) is (property)
time poll (poll) ends
users that (stat) status (status)
vote for poll option (option) in poll (poll)
winning item(s) in poll (poll)
📄 for each status from user (user) as (VAR)
🔔 notification
🔔 status
🔔 when (event) do (statement)
Matrix
+
(action) user (user) from room (room) with reason (reason)
(property) of room (room)
(property) of sticker (sticker)
(property) of user (user)
attachment at location (location)
attachment of message (message)
body of message (message) as (type)
create (visibility) room with name (name) with topic (topic) with alias (alias) invite (invite)
find room (room)
find user by ID (user_id)
forget room (room)
invite user (user) to room (room)
join room (room)
leave room (room)
log in (user_id) and (logon_type) (token) (ignore_me) ignore my own actions (ignore_verification) ignore encryption verification warnings
me
members of room (room)
power level of user (user) in room (room)
redact message (item)
send message to room (room) with content (content)
set power level of user (user) in room (room) to (power_level)
sticker with image location (url) with description (body)
user (user1) is (user2)
🔔 initiator
🔔 message
🔔 room
🔔 sticker
🔔 user
🔔 when (event) do (statement)
System
+
(mode) file (file) with text (text)
(stream) of command (result)
contents of file (file) as text
create directory (directory)
delete item (file)
execute command (command) with arguments (arguments)
exit code of command (result)
file (file) (property)
files in directory (directory)
value of environment variable with name (name) or default (default)
🔥 raise error (error)
Errors
+
D000: Permission denied when querying for a resource (e.g. channel, user, slash commands...).
D001: Invalid snowflake. Check any provided snowflakes and/or improve input validation.
D002: You are requesting a privileged intent you have not also requested for in the console. Check that you have requested the intents in the Developer Console.
D003: Invalid token. Check that you have entered your bot token correctly.
D100: Duplicate interactible ID rejected. Make sure all of your interactibles have unique IDs.
L000: Required value missing. Check all of your blocks to make sure you have values at all required connections.
L001: Tried to query invalid URL. Check to make sure that any URLs queried are valid.