Skip to content

Commit f720534

Browse files
committed
reference: use simple present rather than imperative
Also remove some superfluous documentation of obvious arguments. Signed-off-by: Luca Zeuch <[email protected]>
1 parent 4b7bf87 commit f720534

File tree

1 file changed

+13
-35
lines changed

1 file changed

+13
-35
lines changed

content/docs/reference/templates/functions.md

Lines changed: 13 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,18 @@ Unless specified otherwise, these functions accept an ID, name, or `nil` for the
2424
{{ addThreadMember <thread> <member> }}
2525
```
2626

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.
3128

3229
### createForumPost
3330

3431
```yag
3532
{{ $post := createForumPost <channel> <name> <content> [values] }}
3633
```
3734

38-
Create a new forum post. Returns a channel object on success.
35+
Creates a new forum post. Returns a channel object on success.
3936

4037
- `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.
4239
- `content`: the initial message's content; may be a string, an embed, or a complex message. May not be empty.
4340
- `values` (optional): Additional options for the post. May include:
4441
- `"slowmode"`: The thread's slowmode in seconds.
@@ -51,7 +48,7 @@ Create a new forum post. Returns a channel object on success.
5148
{{ $thread := createThread <channel> <messageID> <name> [private] [auto_archive_duration] [invitable] }}
5249
```
5350

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.
5552

5653
- `channel`: the parent channel to create the thread in.
5754
- `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:
7673
{{ deleteForumPost <post> }}
7774
```
7875

79-
Delete the given forum post.
80-
81-
- `post`: The post to delete.
76+
Deletes the given forum post.
8277

8378
This function is functionally the same to [deleteThread](#deletethread).
8479
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
8984
{{ deleteThread <thread> }}
9085
```
9186

92-
Delete the given thread.
93-
94-
- `thread`: the thread to delete.
87+
Deletes the given thread.
9588

9689
This function is functionally the same to [deleteForumPost](#deleteforumpost).
9790
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
10295
{{ editChannelName <channel> <newName> }}
10396
```
10497

105-
Edit the name of the given channel.
98+
Edits the name of the given channel.
10699

107-
- `channel`: the channel to edit.
108100
- `newName`: the new name for the channel. Must be a string.
109101

110102
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
116108
{{ editChannelTopic <channel> <newTopic> }}
117109
```
118110

119-
Edit the topic of the given channel.
111+
Edits the topic of the given channel.
120112

121-
- `channel`: the channel to modify.
122113
- `newTopic`: the channel's new topic. Must be a string. Discord markdown is supported.
123114

124115
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
130121
{{ $channel := getChannelOrThread <channel> }}
131122
```
132123

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.
136125

137126
### getChannelPins
138127

139128
```yag
140129
{{ $pins := getChannelPins <channel> }}
141130
```
142131

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.
146133

147134
Rate-limited to 2 (premium: 4) calls per custom command execution.
148135

@@ -152,29 +139,23 @@ Rate-limited to 2 (premium: 4) calls per custom command execution.
152139
{{ $channel := getChannel <channel> }}
153140
```
154141

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.
158143

159144
### getPinCount
160145

161146
```yag
162147
{{ $numPins := getPinCount <channel> }}
163148
```
164149

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.
168151

169152
### getThread
170153

171154
```yag
172155
{{ $thread := getThread <thread> }}
173156
```
174157

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.
178159

179160
### removeThreadMember
180161

@@ -184,9 +165,6 @@ Return the full thread object for the given thread. Will not work for channels.
184165

185166
Removes the given member from the given thread.
186167

187-
- `thread`: the thread to remove the member from.
188-
- `member`: the member's ID to remove.
189-
190168
## Database
191169

192170
| **Function** | **Description** |

0 commit comments

Comments
 (0)