@@ -24,21 +24,18 @@ Unless specified otherwise, these functions accept an ID, name, or `nil` for the
24
24
{{ addThreadMember <thread> <member> }}
25
25
```
26
26
27
- Add a member to an existing thread. Does nothing if either argument is invalid.
28
-
29
- - ` thread ` : the thread to add the member to.
30
- - ` member ` : the member's ID.
27
+ Adds a member to an existing thread. Does nothing if either argument is invalid.
31
28
32
29
### createForumPost
33
30
34
31
``` yag
35
32
{{ $post := createForumPost <channel> <name> <content> [values] }}
36
33
```
37
34
38
- Create a new forum post. Returns a channel object on success.
35
+ Creates a new forum post. Returns a channel object on success.
39
36
40
37
- ` channel ` : the forum channel to post to.
41
- - ` name ` : The post title. May not be empty.
38
+ - ` name ` : The post title. May not be empty. Must be a string.
42
39
- ` content ` : the initial message's content; may be a string, an embed, or a complex message. May not be empty.
43
40
- ` values ` (optional): Additional options for the post. May include:
44
41
- ` "slowmode" ` : The thread's slowmode in seconds.
@@ -51,7 +48,7 @@ Create a new forum post. Returns a channel object on success.
51
48
{{ $thread := createThread <channel> <messageID> <name> [private] [auto_archive_duration] [invitable] }}
52
49
```
53
50
54
- Create a new thread in the specified channel. Returns a channel object on success.
51
+ Creates a new thread in the specified channel. Returns a channel object on success.
55
52
56
53
- ` channel ` : the parent channel to create the thread in.
57
54
- ` message ` : either ` nil ` to create a channel thread, or a message ID to create a message thread.
@@ -76,9 +73,7 @@ is archived after an hour and allows non-moderators to add others:
76
73
{{ deleteForumPost <post> }}
77
74
```
78
75
79
- Delete the given forum post.
80
-
81
- - ` post ` : The post to delete.
76
+ Deletes the given forum post.
82
77
83
78
This function is functionally the same to [ deleteThread] ( #deletethread ) .
84
79
Use whichever function is semantically more meaningful in the context of your custom command.
@@ -89,9 +84,7 @@ Use whichever function is semantically more meaningful in the context of your cu
89
84
{{ deleteThread <thread> }}
90
85
```
91
86
92
- Delete the given thread.
93
-
94
- - ` thread ` : the thread to delete.
87
+ Deletes the given thread.
95
88
96
89
This function is functionally the same to [ deleteForumPost] ( #deleteforumpost ) .
97
90
Use whichever function is semantically more meaningful in the context of your custom command.
@@ -102,9 +95,8 @@ Use whichever function is semantically more meaningful in the context of your cu
102
95
{{ editChannelName <channel> <newName> }}
103
96
```
104
97
105
- Edit the name of the given channel.
98
+ Edits the name of the given channel.
106
99
107
- - ` channel ` : the channel to edit.
108
100
- ` newName ` : the new name for the channel. Must be a string.
109
101
110
102
This function is, together with [ editChannelTopic] ( #editchanneltopic ) , limited to 10 calls per custom command execution.
@@ -116,9 +108,8 @@ In addition to this, Discord limits the number of channel modifications to 2 per
116
108
{{ editChannelTopic <channel> <newTopic> }}
117
109
```
118
110
119
- Edit the topic of the given channel.
111
+ Edits the topic of the given channel.
120
112
121
- - ` channel ` : the channel to modify.
122
113
- ` newTopic ` : the channel's new topic. Must be a string. Discord markdown is supported.
123
114
124
115
This function is, together with [ editChannelName] ( #editchannelname ) , limited to 10 calls per custom command execution.
@@ -130,19 +121,15 @@ In addition to this, Discord limits the number of channel modifications to 2 per
130
121
{{ $channel := getChannelOrThread <channel> }}
131
122
```
132
123
133
- Return the full channel or thread object for the given channel.
134
-
135
- - ` channel ` : the channel or thread to get.
124
+ Returns the full channel or thread object for the given channel.
136
125
137
126
### getChannelPins
138
127
139
128
``` yag
140
129
{{ $pins := getChannelPins <channel> }}
141
130
```
142
131
143
- Return a slice of message objects pinned to the channel or thread.
144
-
145
- - ` channel ` : the channel or thread to get pinned messages from.
132
+ Returns a slice of message objects pinned to the given channel or thread.
146
133
147
134
Rate-limited to 2 (premium: 4) calls per custom command execution.
148
135
@@ -152,29 +139,23 @@ Rate-limited to 2 (premium: 4) calls per custom command execution.
152
139
{{ $channel := getChannel <channel> }}
153
140
```
154
141
155
- Return the full channel object for the given channel. Will not work for threads.
156
-
157
- - ` channel ` : the channel to get.
142
+ Returns the full channel object for the given channel. Will not work for threads.
158
143
159
144
### getPinCount
160
145
161
146
``` yag
162
147
{{ $numPins := getPinCount <channel> }}
163
148
```
164
149
165
- Return the number of pinned messages in given channel.
166
-
167
- - ` channel ` : the channel to count pinned messages in.
150
+ Returns the number of pinned messages in given channel.
168
151
169
152
### getThread
170
153
171
154
``` yag
172
155
{{ $thread := getThread <thread> }}
173
156
```
174
157
175
- Return the full thread object for the given thread. Will not work for channels.
176
-
177
- - ` thread ` : the thread to get.
158
+ Returns the full thread object for the given thread. Will not work for channels.
178
159
179
160
### removeThreadMember
180
161
@@ -184,9 +165,6 @@ Return the full thread object for the given thread. Will not work for channels.
184
165
185
166
Removes the given member from the given thread.
186
167
187
- - ` thread ` : the thread to remove the member from.
188
- - ` member ` : the member's ID to remove.
189
-
190
168
## Database
191
169
192
170
| ** Function** | ** Description** |
0 commit comments