File tree Expand file tree Collapse file tree 2 files changed +26
-2
lines changed
src/content/docs/guides/other Expand file tree Collapse file tree 2 files changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -65,10 +65,10 @@ Defining and using multiple macros:
65
65
``` js
66
66
< client> .macro ({
67
67
name: ' logmessage' ,
68
- code: ' $log[aoi.js bot just started c:]'
68
+ code: ` $log[aoi.js bot just started c:]`
69
69
}, {
70
70
name: ' onlyDevelopers' ,
71
- code: ' $onlyIf[$authorID==918231238912839;You are not a developer.]'
71
+ code: ` $onlyIf[$authorID==918231238912839;You are not a developer.]`
72
72
});
73
73
```
74
74
``` js
Original file line number Diff line number Diff line change @@ -73,6 +73,30 @@ You require `{newEmbed:{...}}` every time you want to use embed parsers.
73
73
{timestamp:ms?} // Adds a timestamp to the embed.
74
74
```
75
75
76
+ ## Message Components
77
+
78
+
79
+ :::tip
80
+
81
+ You require ` {newContainer:{...}} ` or ` {newSection:{...}} ` wrappers to declare components in your messages.
82
+
83
+ :::
84
+
85
+ ### Message Components Functions
86
+
87
+ ``` aoi
88
+ {color:DiscordResolvableColor} // Sets the color for the container.
89
+ {spoiler:true/false} // Marks the container or media as a spoiler.
90
+ {text:content} // Adds a text display component inside a section or container.
91
+ {thumbnail:URL:spoiler?:description?} // Adds a thumbnail with optional spoiler and description.
92
+ {button:label:style:custom_id:disabled?:emoji?} // Adds a button with label and style.
93
+ {actionRow:{...}} // Defines an action row to group buttons or select menus.
94
+ {gallery:{media:URL:spoiler?:description?}} // Adds a media gallery containing one or more media items.
95
+ {media:URL:spoiler?:description?} // Defines a single media item inside a gallery.
96
+ {separator:divider?:type?} // Adds a separator line with optional boolean divider (true/false) and numeric type.
97
+ {file:filename:spoiler?} // Adds a file attachment with optional spoiler flag.
98
+ ```
99
+
76
100
---
77
101
78
102
## Components Parser
You can’t perform that action at this time.
0 commit comments