Parser
Table of Contents
ExtraOptions/Options Parser Functions
{execute:awaitedCommand} // executes an awaited command{reply:messageId:reply?} // replies to a given message{interaction} // declares reply as an interaction{ephemeral} // declares interaction as ephemeral{reactions:...reactions} // adds reactions to a message{attachment:attachmentName:attachment} // sends file, image as attachment{file:fileName:content} // creates a text file with the given content{deleteCommand} // deletes the command which was used to execute the command{deleteIn:time} // deletes the given reply within the provided time{suppress} // suppress the output
These parser can only be used within specific functions, for example:
$sendMessage
, $channelSendMessage
or similar. This includes functions like $onlyIf
.
Embed Parser
Embed Parser are handy to use once you know how, this section will be covering the basics about embed parsers.
Embed Parser Functions
{title:text} // Adds title to the embed.{url:URL} // Adds clickable link to the title.{description:text} // Adds description to the embed.{color:...} // Adds color to the side of the embed.{footer:text:icon?} // Adds footer to the embed with either small image on the left of the footer or none.{image:URL} // Adds big image at the bottom of the embed.{thumbnail:URL} // Adds a small image in the right-upper-corner.{author:name:icon?} // Adds text above the title with either a small icon on the left or none.{authorURL:URL} // Adds clickable link to the author.{field:title:value:inline? (true / false)} // Adds fields to the embed, which is either inline or not.{timestamp:ms?} // Adds a timestamp to the embed.
Components Parser
Button Parser
Usage:
{button:label:style:customID:disabled? (true / false):emoji?}
Button Types
Name | Value | Color | |
---|---|---|---|
Primary | 1 | blurple | {button:Button:primary:customID:false} |
Secondary | 2 | grey | {button:Button:secondary:customID:false} |
Success | 3 | green | {button:Button:success:customID:false} |
Danger | 4 | red | {button:Button:danger:customID:false} |
Link | 5 | grey, navigates to a URL | {button:Button:link:https\\:aoi.js.org/invite:false} |
Emoji | - | primary button with emoji | {button:Button:primary:customID:false:emojiName or emojiID or emoji String} |
Select Menu Parser
Select Menu Parser Usage:
{selectMenu:customID:placeholder:minValue:maxValue:default(true / false):...options}
{stringInput:optionName:customID:optionDescription:default? (true / false):emoji?}
// for every option you want to add to the select menu, you can use the following:{roleInput}
{channelInput}
{mentionableInput}
{userInput}
Interaction Modal Parser
Interaction Modal Parser Usage:
{textInput:label:style:customID:required? (true / false):placeholder?:minLength?:maxLength?:defaultValue?}
Parsers Examples
Below are simple examples of each parser and how to use them.
Embed Parser
Embed with title, footer, image and field.
{newEmbed:{title:Another Awesome Example !}{image:https://cdn.discordapp.com/banners/773352845738115102/01e9a05d24039fe562bcc8ab95e721f8.webp?size=4096}{field:This is a field title!:And a field description which is not inline!:false}{footer:Example #2}}
Components Parser
Button Parser
Two buttons each one in a different row.
{actionRow:{button:Button:secondary:button1}}{actionRow:{button:Button:primary:button2}}
Three buttons, one with emoji.
{actionRow:{button:Button:primary:button1:false}{button:Button:primary:button2:false}{button:Button:danger:button3:false:👋}}
Select Menu Parser
Single-Select Menu with two options
{actionRow:{selectMenu:customID:Placeholder:1:1:false:{stringInput:Option1:1:OptionDescription1:false:👋}{stringInput:Option2:2:OptionDescription2:false}}}
Multi-Select Menu with three options and a maximum of 2 selectable options
{actionRow:{selectMenu:customID:Placeholder:1:2:false:{stringInput:Option1:1:OptionDescription1:false:👋}{stringInput:Option2:2:OptionDescription2:false}{stringInput:Option3:3:OptionDescription3:false}}}
User-Select Menu
{actionRow:{selectMenu:customID:Placeholder:1:1:false:{userInput}}}
Interaction Modal Parser
Modal with two fields one being normal sized and the other being bigger.
{actionRow:{textInput:ExampleTitle1:1:customID1:true}}{actionRow:{textInput:ExampleTitle2:2:customID2:false}}