Responder
{responder}
tags let you construct a message that will be sent once the action is over, or you manually send it. These tags are meant to be chained together to form a complete responder.
{responder.text;Hello!}
{responder.embed title="World"}
{responder.send}
{responder.text;message}
Appends text to the output message. If there is more text, it will be appended to the existing text.
{responder.text;Hello World}
will make the output message "Hello World"
{responder.text;Hello}{responder.text;World}
will make the output message "Hello World"
{responder.text;Hello}{responder.text;}
empty text will clear existing text.
{responder.dm fallback=false;member}
This tag is part of the
Create DM
expensive group.
Set the responder to dm a user. This tag can be hit and miss if the user has their direct-messages closed.
{responder.dm;{user.id}}
will make the message direct-message the user in context.
{responder.dm fallback=true;{user.id}}
will send a message to the user and will fall back to the context channel if the user has their direct-mesage closed.
{responder.embed}
This tag is used to add embeds to the message. Calling it multiple times will add multiple embeds to the message, up to a maximum of 10.
{responder.embed title="Hello world"}
{responder.embed title=Test timestamp="5 hours ago"}
Embed Elements
author-image
author-name
author-url
color
description
footer
footer-icon
image
thumbnail
timestamp
title
url
Use the Embed Builder to quickly build an embed.
Color Defaults
Black: #000000 Dark Mode: #36393f White: #FFFFFF Red: #ED4245 Pink: #EB459E Fuchsia: #EB459E Purple: #9C27B0 Blurple: #5865F2 Blurple Classic: #7289DA Deep Purple: #673AB7 Indigo: #3F51B5 Blue: #2196F3 Light Blue: #03A9F4 Cyan: #00BCD4 Teal: #009688 Green: #57F287 Light Green: #8BC34A Lime: #CDDC39 Yellow: #FEE75C Amber: #FFC107 Orange: #FF9800 Deep Orange: #FF5722 Brown: #795548 Grey: #9E9E9E Blue Grey: #607D8B Role Default: #4f545c Magenta: #E91E63
{responder.embedField;name;value;inline}
Add a field to the last created embed.
{responder.embed title="My Embed" description="Fortnite or something idk"}
{responder.embedField name="My Field" value="very cool" inline=true}
{responder.embedField name="Another One" value="even cooler" inline=true}
{responder.channel;channel}
Set the channel the message will be sent to. Setting a channel with a context interaction will have the responder ignore that interaction when sending a message. The context interaction must still be replied to or it will be marked as failed.
// Do some weird logging stuff to a separate channel that the user will never see
{responder.channel;MY_LOG_CHANNEL}
{responder.text;{user.mention} ran our command!}
{responder.send} // Send the log message to the log channel
// Now we reply to the slash command (context interaction). This is required,
// not replying will have Discord mark the interaction as failed. Depending on a few factors,
// if we don't reply Atlas will automatically send a "The action did not output anything" message
// to stop it being marked as failed.
{responder.text;Hi {user.mention}! This is a reply to the context interaction that is required for it not to fail}
// No need for {responder.send} as it is automatically once the script finishes executing if its configured
{responder.reset}
Reset any options already applied to the responder.
{responder.text;Hello}
{responder.reset}
{responder.text;Something bad happened!}
This would output "Something bad happened!"
{responder.ephemeral}
Mark the message as ephemeral. Only works with interactions.
{responder.error;message}
This is the same as {responder.text}
, with some extras;
- Embeds will be set to red
- The message will be set to ephemeral
You should use this whenever sending error messages.
{responder.send return_id=false ignore_interaction=false}
This tag is part of the
Create Message
expensive group.
Send the message immediately. This will automatically call {responder.reset}
if the message is sent successfully.
return_id
can be used to get the output message ID. return_id does not work when replying to an interaction. Discord does not give us message data when we send an interaction, however because the responder will assume you mean the context interaction, leaving out the ID should do effectively the same thing.
ignore_interaction
can be set to have the responder ignore the context interaction and reply with a regular message in the context channel. The interaction still needs a reply or it will be marked as failed, you should only use this to send off a separate message.
If the responder is configured when the script finishes, it will be sent automatically. This means you probably don't need {responder.send}
unless you're sending multiple messages.
{responder.edit;message}
Set the responder to edit the given message. Atlas must have sent the message to edit it. Place after the new message content.
{responder.button label handler? stateless? state? url? emoji? style=primary actionRowIndex? disabled=false userLock?}
Add a button to the message.
Arguments
label
is the button text.handler
is the value of the component callback action to call when the button is clickedstate
is an optional payload that will be accessible in the component callback actionurl
can be used to link to external resourcesemoji
is the name of an emoji to add to the button. Can be a guild emoji or a native emoji.stateless
Whether this button should be forced to be a stateless interaction. Required if you don't want the button to expire.style
can change the button style, which defaults toPrimary
. This will be ignored ifurl
is present.disabled
can be set totrue
to disable the button.actionRowIndex
can be used to set the row the button is in. This is useful if you want to have multiple buttons in a row.userLock
lock this interaction the the defined user.
If you want a button to only have an emoji, here is a fun hack. Copy this empty space and paste it into the button label.
{responder.select handler stateless=false state? disabled=false placeholder? minValues? maxValues? actionRowIndex? type=StringSelect userLock?;options}
Create a new select menu with the given options.
Arguments
handler
is the value of the component callback action to call when the menu is interacted withstate
is an optional payload that will be accessible in the component callback actionstateless
Whether this menu should be forced to be a stateless interaction. Required if you don't want the menu to expire.disabled
can be set totrue
to disable the menu.placeholder
is the text to show when no option is selectedminValues
is the minimum number of options that must be selectedmaxValues
is the maximum number of options that can be selectedtype
can beStringSelect
,UserSelect
,RoleSelect
,MentionableSelect
, orChannelSelect
.actionRowIndex
can be used to set the row the menu is in. This is useful if you want to have multiple menus on a message.userLock
lock this interaction the the defined user.
options
is an array of select options, and is required for StringSelect
menus.
{=options;{{
"value": [
{
"label": "Option One",
"value": "1"
},
{
"label": "Option Two",
"value": "2"
}
]
}}}
{responder.select handler=my_callback placeholder="Select an option";{$options.value}}
{responder.reference;message?}
Set the responder to reference the given message. Call with no params, {responder.reference}
, to stop the bot replying to the context message.
{responder.sendModal;title;handler;stateless?;components;state?}
Replies to an interaction with a modal.
title
The title of the modal.handler
The name of the component callback handler to use for the modal.stateless
Whether the custom id should be forced to stateless. Defaults tofalse
.components
The components to add to the modal.state
The state to pass to the callback.
This tag will create a modal with the given title and components, and send it to the user who initiated the interaction. The modal will be associated with the provided handler, which will be called when the user submits the modal.
Example:
{=data;{{
"components": [
{
"type": 1,
"components": [
{
"type": 4,
"custom_id": "my_input",
"style": "short",
"label": "Your Name",
"required": true
}
]
}
]
}}}
{responder.sendModal
title="Example Modal"
handler="my_modal_handler"
components={$data.components}
}
This tag will create a modal with the title "Example Modal" and a single input field labelled "Your Name". The handler action "my_modal_handler" will be called when the user submits the modal. The values will be available in the callback action as {$fields}
.
{responder.deferReply;ephemeral?}
Defer the reply to an interaction. This is useful if you need to do some processing before sending a reply.
ephemeral
Whether the reply should be ephemeral. Defaults tofalse
.