βοΈPlaceholders
How it works?
When you have text inputs in actions or filters, you might want parts of text to be automatically filled with dynamic values. This is exactly what the placeholder system allows.
Typical example
You have created a behavior that sends a message that says "Hello everyone!" and you want to add in this message the number of members present on your server to have a result like this:
"Hello everyone! Today we have 158 members on our server!"
Well this is possible with the placeholder system!
You just need to write this as a message in the configuration:
"Hello everyone! Today we have {guild_member_count} members on our server!"
Obviously, you should not write the quotation marks "
Format
All placeholders have the format {placeholder}.
List
Here is the list of all available placeholders.
Some placeholders can only work in certain contexts. For example, it is impossible to use the placeholder {event_channel} in the MEMBER_JOIN event because no channel is affected by the arrival of a new member.
Placeholders that do not depend on context
{character}
The name of the character concerned.
A common usage is to do an AI_SEND_MESSAGE action and pre-prompt something like: "You are {character} so answer like him."
Return example: Bobby
{guild_name}
The name of the server the bot is on. For example, this can be useful if you make a welcome message and often change the name of your server.
Return example: My super server
Placeholders that depend on the context:
{event_message}
Gives the message context, usually when you use the MESSAGE event. The return only keeps the formatting but not the mentions.
Return example: Hello everyone! Whizyyy
{event_message_stripped}
Gives the message context, usually when you use the MESSAGE event. The return only keeps the text. For example, it removes mentions and the ** for bold.
Return example: Hello everyone! Whizyyy
Parsing
If you want to test the return of placeholders, it's possible!
You can use the /placeholder parse command.
β οΈ Be careful, the {character} will not work because no character is associated.
Last updated