You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/docs/custom-commands/database.md
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,18 @@ The database page displays all database entries created by custom commands, allo
11
11
12
12
<center>
13
13
14
-
**1** Entry ID **2** Created Timestamp **3** Updated Timestamp **4** Expiry Timestamp **5** User ID **6** Key **7** Value **8** Size of Value **9** Delete Entry **10** Page Navigation **11** Search Query **12** Search Bar
When the `unban`/ `unmute` commands are used, YAGPDB will log their usage to the [mod log](#mod-channels) similarly to the other moderation commands.
44
57
45
58
When using the `ban` and `mute` commands with a duration, YAGPDB will automatically undo the punishment after the specified duration.
46
-
For instance, if you execute `ban @user 1d`, YAGPDB will ban the user, and 1 day later YAGPDB will execute the `unban` command with reason "Timed ban expired." This action appears in the mod log as YAGPDB being the moderator.
59
+
For instance, if you execute `ban @user 1d`, YAGPDB will ban the user, and 1 day later YAGPDB will execute the `unban` command with reason "Timed ban expired".
60
+
This action appears in the mod log as YAGPDB being the moderator.
47
61
48
62
Toggling Unban Logging (**6**) allows you to enable or disable the logging of Unmute events.
49
63
@@ -80,7 +94,9 @@ Each of the main moderation tools have individual configuration pages, accessibl
Any errors which occur in the template execution will not be logged by default.
124
-
The offending user will only receive a DM from your server saying **Failed executing template.** Setting a [Moderation DM Error channel](#mod-channels) allows for the more detailed errors to be captured.
140
+
The offending user will only receive a DM from your server saying **Failed executing template**.
141
+
Setting a [Moderation DM Error channel](#mod-channels) allows for the more detailed errors to be captured.
Copy file name to clipboardExpand all lines: content/docs/notifications/youtube.md
+9-4Lines changed: 9 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@ The bot requires at least the "Read Messages" and "Send Messages" permissions in
14
14
15
15
## Adding a YouTube Feed
16
16
17
-
To add a new feed simply copy the channel URL from YouTube and paste it into the "Link" field under "Add New Feed" (you may need to scroll down a bit); then select a channel to post it to.
17
+
To add a new feed simply copy the channel URL from YouTube and paste it into the "Link" field under "Add New Feed" (you may need to scroll down a bit), then select a channel to post it to.
18
18
For a visual reference, please see the image below.
19
19
20
20
<center>
@@ -23,23 +23,28 @@ For a visual reference, please see the image below.
23
23
24
24
</center>
25
25
26
-
If you are unable to obtain a direct channel URL, similar to If you are unable to obtain a direct channel URL, similar to<br> *<https://youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw>*, we also support the following URLs:
26
+
If you are unable to obtain a direct channel URL, similar to <https://youtube.com/channel/UCuAXFkgsw1L7xaCfnd5JJOw>, we also support the following URLs:
27
27
28
28
- Video links (<https://youtube.com/watch?v=dQw4w9WgXcQ>)
Although we make an attempt at extracting the channel from usernames (<https://youtube.com/user/MontyPython>), custom links (<https://youtube.com/c/Taskmaster>), and handles (<https://youtube.com/@TomScottGo>), these are not as reliable as the links listed above, as we use the first result of a YouTube search to determine the channel via these URLs.
as we use the first result of a YouTube search to determine the channel via these URLs.
36
41
If you find yourself having trouble adding a feed using these kinds of URLs, please try to use one of the links listed above before asking for help in the [support server](/discord).
37
42
38
43
{{< callout context="caution" title="Warning: Maximum Number of Feeds" icon="outline/info-circle" >}}
39
44
40
45
You cannot have more than 10 active YouTube feeds at a time (250 with [Premium](/docs/welcome/premium)).
41
46
If you have that many feeds active, you cannot add more until you disable at least one of those.
42
-
That disabled excess feed will be deleted once you add a new one.
47
+
Disabled excess feeds will be deleted once you add a new one.
Copy file name to clipboardExpand all lines: content/docs/reference/components-v2.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,8 @@ description = "Be fancier, use components!"
6
6
7
7
## componentBuilder
8
8
9
-
`componentBuilder` is a helper for building Discord’s new Components V2 (sections, buttons, menus, galleries). It provides a simple template-based way to assemble complex message layouts without needing to write raw JSON.
9
+
The `componentBuilder` is a helper for building Discord’s new Components V2 (sections, buttons, menus, galleries).
10
+
It provides a simple template-based way to assemble complex message layouts without needing to write raw JSON.
10
11
You describe components with key–value pairs and `componentBuilder` handles conversion and validation for you.
YAGPDB has a built-in random response system for custom commands, but sometimes you may want to control the chances for certain responses to occur.
26
26
You can do this by creating a singular response and creating a variable with randInt.
27
27
Then use an if-else-if statement like this to print out your desired output.
28
-
YAGPDB has a built-in random response system for custom commands, but sometimes you may want to control the chances for certain responses to occur. You can do this by creating a singular response and creating a variable with randInt. Then use an if-else-if statement like this to print out your desired output. 
28
+
YAGPDB has a built-in random response system for custom commands, but sometimes you may want to control the chances for certain responses to occur.
29
+
You can do this by creating a singular response and creating a variable with randInt.
30
+
Then use an if-else-if statement like this to print out your desired output.
29
31
30
32
```yag
31
33
{{$var := randInt 100}}
@@ -43,8 +45,7 @@ This has a 65% chance of being triggered
43
45
44
46
This command is to be placed in the welcome message.
45
47
It filters out people with invites in their name.
46
-
Make sure that the checkbox **Censor server invites in usernames?** and the ban command are enabled on your server. and the ban command are enabled on your server. 
47
-
48
+
Make sure that the checkbox **Censor server invites in usernames?** and the ban command are enabled on your server.
48
49
You might not want the response for the executed command to show.
49
50
You can suppress the response of a command like the following:
`$k` is the index for arrays / cslices (starting at 0) or the key for maps and sdicts, while `$v` is the current word in your input that you are on. is the current word in your input that you are on. 
85
-
86
-
Range will work on any kind of slice/array. for example.
87
-
If we wanted to look for all the entries in our database we can use range and index through them all in the following.
88
-
Range will work on any kind of slice/array. for example. If we wanted to look for all the entries in our database we can use range and index through them all in the following. 
85
+
`$k` is the index for arrays / cslices (starting at 0) or the key for maps and sdicts, while `$v` is the current word in your input that you are on.
86
+
Range will work on any kind of slice/array, so if we wanted to look for all the entries in our database we can use range and index through them all in the following.
89
87
90
88
```yag
91
89
{{$lb := dbTopEntries "%" 100 0}}
@@ -152,7 +150,8 @@ This custom command is very complex, uses very many advanced functions, all it d
Second part of the custom commands, here we see, how `data`-part of exeCC was made in previous custom command as `sdict`and now we are calling those keys with `.ExecData` - for example `.ExecData.MessageID` sets new variable the same as stated in previous code.
153
+
Second part of the custom commands, here we see, how `data`-part of exeCC was made in previous custom command as `sdict`and now we are calling those keys with `.ExecData`.
154
+
For example `.ExecData.MessageID` sets new variable the same as stated in previous code.
156
155
157
156
```yag
158
157
{{$timeLeft := .ExecData.T.Sub currentTime}}
@@ -261,11 +260,10 @@ You can either make them global cooldowns or a per user cooldown.
261
260
262
261
With YAGPDB's database system, I made a command to have users count from 0 and keep counting to the next number.
263
262
Relatively simple command that involves database and type conversion.
264
-
With YAGPDB's database system, I made a command to have users count from 0 and keep counting to the next number. Relatively simple command that involves database and type conversion. 
265
263
266
264
Trigger type: `Regex` Trigger: `\A`
267
265
268
-
`BE SURE TO RESTRICT THE COMMAND TO A SINGLE CHANNEL` 
266
+
`BE SURE TO RESTRICT THE COMMAND TO A SINGLE CHANNEL`
269
267
270
268
```yag
271
269
{{/* If you are not doing (no twice msg in a row) or (role assignment for latest user) you can remove counter_user and by extension everything to do with $lastUser*/}}
This command does a good job at using a little bit of everything.
390
388
Which include but is not limited to, `conditional statement`, `assigning values to variable`, `getting command arguments`, `using template code`, and `creating embeds`.
391
389
If you are able to understand everything in this command, you are at a very good place in being able to make advanced custom commands.
392
-
. If you are able to understand everything in this command, you are at a very good place in being able to make advanced custom commands. 
Copy file name to clipboardExpand all lines: content/docs/reference/templates/functions.md
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,7 +74,8 @@ Returns a channel object on success.
74
74
-`message`: either `nil` to create a channel thread, or a message ID to create a message thread.
75
75
-`private`: whether the thread is private.
76
76
Default `false`.
77
-
-`auto_archive_duration`: how long the thread will show in the channel list after inactivity. : how long the thread will show in the channel list after inactivity.<br> Valid values are 60, 1440, 4320, and 10080 minutes.
77
+
-`auto_archive_duration`: how long the thread will show in the channel list after inactivity.
78
+
Valid values are 60, 1440, 4320, and 10080 minutes.
78
79
Defaults to 10080 (7 days).
79
80
-`invitable`: whether non-moderators can add other members to the thread. (true/false)
80
81
@@ -400,7 +401,8 @@ Returns up to `amount` entries from the database, sorted in descending order by
400
401
Numerical values are stored as floating-point numbers in the database; large numbers such as user IDs will lose precision.
401
402
To avoid this, convert them to a string before writing to the database.
402
403
403
-
Numerical `dict` keys are retrieved as an `int64`, therefore you'd have to write , therefore you'd have to write<br> `{{ $dict.Get (toInt64 N)}}` to retrieve the value associated with the numerical key `N`.
404
+
Because numerical `dict` keys are retrieved as an `int64`, you have to first convert to `int64` when retrieving such values.
405
+
So, to retrieve the value associated with the numerical key `N`: `{{ $dict.Get (toInt64 N)}}`.
404
406
405
407
{{< /callout >}}
406
408
@@ -501,7 +503,8 @@ Executes another custom command specified by `ccID`.
501
503
-`delay`: the delay in seconds before executing the custom command.
502
504
-`data`: some arbitrary data to pass to the executed custom command.
503
505
504
-
Calling `execCC` with 0 delay sets `.StackDepth` to the current recursion depth and limits it to 2. `execCC` is rate-limited strictly to a maximum of 10 delayed custom commands executed per channel per minute.
506
+
Calling `execCC` with 0 delay sets `.StackDepth` to the current recursion depth and limits it to 2.
507
+
`execCC` is rate-limited strictly to a maximum of 10 delayed custom commands executed per channel per minute.
0 commit comments