Skip to content

Commit 3eee684

Browse files
authored
Merge pull request #469 from NilPointer-Software/dev
Push changes to prod
2 parents f91eb70 + 2fe311d commit 3eee684

6 files changed

Lines changed: 202 additions & 27 deletions

File tree

src/SUMMARY.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,9 @@
528528
- [$reaction](./premium/reaction.md)
529529
- [Functions]()
530530
- [$ai](./premium/ai.md)
531+
- [$aiDecide](./premium/aiDecide.md)
532+
- [$aiWithCtx](./premium/aiWithCtx.md)
533+
- [$aiDecideWithCtx](./premium/aiDecideWithCtx.md)
531534
- [$aiQuota](./premium/aiQuota.md)
532535
- [$awaitReactions](./premium/awaitReactions.md)
533536
- [$customImage](./premium/customImage.md)

src/bdscript/clear.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
# $clear
22
Deletes a certain amount of messages.
3-
3+
44
```admonish tip
55
When using just `$clear`, the author's message must include a number.
6-
```
6+
```
77

88
## Syntax
99
```
1010
$clear
1111
```
12-
12+
1313
```admonish warning
1414
Discord doesn't allow deleting messages in bulk which are over 2 weeks old.
15-
```
15+
```
16+
17+
```admonish warning
18+
Use [`$clear[]`](./clearComplex.md) for slash commands.
19+
```
1620

1721
### Permissions
1822
Required permissions that the bot must have for this function to work properly:

src/premium/aiDecide.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# $aiDecide
2+
<div class="functionTags">
3+
<span id="PremiumTag">Premium</span>
4+
</div>
5+
6+
Asks AI a yes/no question about the provided content and returns `true` or `false`.
7+
8+
## Syntax
9+
```
10+
$aiDecide[Content;Question]
11+
```
12+
13+
```admonish tip title="AI Quota"
14+
Each call to `$aiDecide[]` consumes tokens from your daily quota. Use [`$aiQuota`](./aiQuota.md) to check how many tokens you have left.
15+
```
16+
17+
### Parameters
18+
- `Content` `(Type: String || Flag: Required)`: The content to evaluate, for example: a message or variable.
19+
- `Question` `(Type: String || Flag: Required)`: A yes/no question about the content, for example: "Does this message contain profanity?".
20+
21+
### Returns
22+
Returns `true` if the AI answers yes, or `false` if it answers no.
23+
24+
## Example
25+
```
26+
$nomention
27+
$if[$aiDecide[$message;Is this message a question?]==true]
28+
That looks like a question!
29+
$else
30+
That's not a question.
31+
$endif
32+
```
33+
34+
``` discord yaml
35+
- user_id: 803569638084313098
36+
username: RainbowKey
37+
color: "#E67E22"
38+
content: |
39+
!example What time is it?
40+
- user_id: 1009018156494368798
41+
username: BDFD Support
42+
color: "#378afa"
43+
bot: true
44+
verified: true
45+
content: |
46+
That looks like a question!
47+
```
48+
\
49+
50+
```admonish tip
51+
Use [`$aiDecideWithCtx[]`](./aiDecideWithCtx.md) if you want AI to automatically receive the full Discord message context.
52+
```

src/premium/aiDecideWithCtx.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# $aiDecideWithCtx
2+
<div class="functionTags">
3+
<span id="PremiumTag">Premium</span>
4+
</div>
5+
6+
Asks AI a yes/no question about the Discord message context and returns `true` or `false`.
7+
8+
## Syntax
9+
```
10+
$aiDecideWithCtx[Question]
11+
```
12+
13+
```admonish tip title="AI Quota"
14+
Each call to `$aiDecideWithCtx[]` consumes tokens from your daily quota. Use [`$aiQuota`](./aiQuota.md) to check how many tokens you have left.
15+
```
16+
17+
### Parameters
18+
- `Question` `(Type: String || Flag: Required)`: A yes/no question about the message context, for example: "Does this message contain profanity?".
19+
20+
### Returns
21+
Returns `true` if the AI answers yes, or `false` if it answers no.
22+
23+
### Context provided to AI
24+
The same Discord message context as [`$aiWithCtx[]`](./aiWithCtx.md) is automatically included, along with the full message content.
25+
26+
## Example
27+
```
28+
$nomention
29+
$if[$aiDecideWithCtx[Does this message contain profanity?]==true]
30+
$deleteMessage
31+
Please keep it clean!
32+
$endif
33+
```
34+
35+
``` discord yaml
36+
- user_id: 803569638084313098
37+
username: RainbowKey
38+
color: "#E67E22"
39+
content: |
40+
!example What the heck is going on?
41+
- user_id: 1009018156494368798
42+
username: BDFD Support
43+
color: "#378afa"
44+
bot: true
45+
verified: true
46+
content: |
47+
Please keep it clean!
48+
```
49+
\
50+
51+
```admonish tip
52+
Use [`$aiDecide[]`](./aiDecide.md) if you want to provide the content to evaluate manually instead of using the message context.
53+
```

src/premium/aiWithCtx.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# $aiWithCtx
2+
<div class="functionTags">
3+
<span id="PremiumTag">Premium</span>
4+
</div>
5+
6+
Prompts AI with your message alongside the Discord message context (author, channel, server, mentions, attachments, reactions, and replied-to message).
7+
8+
## Syntax
9+
```
10+
$aiWithCtx[Prompt;(System prompt;Response token limit)]
11+
```
12+
13+
```admonish tip title="AI Quota"
14+
[4 characters in the AI answer](./ai.md) = [1 token](./aiQuota.md)
15+
```
16+
17+
### Parameters
18+
- `Prompt` `(Type: String || Flag: Required)`: Prompt to the AI, for example: "Summarize the message above".
19+
- `System prompt` `(Type: String || Flag: Optional)`: Additional system prompt appended after the message context.
20+
- `Response token limit` `(Type: Integer || Flag: Optional)`: Limit length of the response generated by AI.
21+
22+
### Context provided to AI
23+
The following information from the triggering Discord message is automatically included:
24+
25+
| Field | Description |
26+
|-------------------|---------------------------------------------------------------------|
27+
| Author | Username and user ID |
28+
| Author nickname | Server nickname, if set |
29+
| Channel | Channel name |
30+
| Server | Server name |
31+
| Timestamp | Message sent time |
32+
| Edited at | Edit time, if the message was edited |
33+
| Mentions everyone | Whether `@everyone` was used |
34+
| Mentions | Usernames and IDs of mentioned users |
35+
| Attachments | Filenames of attached files |
36+
| Reactions | Emoji name and reaction count |
37+
| Reply to | Author and content (up to 200 characters) of the replied-to message |
38+
39+
## Example
40+
```
41+
$nomention
42+
$aiWithCtx[$message;Be friendly and casual]
43+
```
44+
45+
``` discord yaml
46+
- user_id: 803569638084313098
47+
username: RainbowKey
48+
color: "#E67E22"
49+
content: |
50+
!example Hello, how's it going?
51+
- user_id: 1009018156494368798
52+
username: BDFD Support
53+
color: "#378afa"
54+
bot: true
55+
verified: true
56+
content: |
57+
Hey Rainbow! All good here, thanks for asking! Hope you're doing great too 😊
58+
```
59+
\
60+
61+
```admonish tip
62+
Use [`$ai[]`](./ai.md) if you want to supply the content manually without automatic message context.
63+
```

src/premium/introduction.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -31,29 +31,29 @@ One premium point equals one week (7 days) of premium hosting.
3131

3232
## Premium Perks
3333

34-
Feature | Without premium | With premium |
35-
------------------------------------------------------------------------------------------------------------------- | --- | ----- |
36-
Access to AI functions. ([`$ai[]`](./ai.md) and [`$aiQuota`](./aiQuota.md)) | ❌ | ✅ |
37-
AI Tokens (per day) | 0 | 10000 |
38-
Access to Bot Logs and to Bot Logs functions. (`$log[]`, `$disableErrorLogging` and `$logQuota`) | ❌ | ✅ |
39-
Logs Quota (per day) | 0 | 3000 |
40-
Access to [`$messageContains[]`](./messageContains.md) and [`$alwaysReply`](./alwaysReply.md) callbacks. | ❌ | ✅ |
41-
Access to [`$ignoreTriggerCase`](./ignoreTriggerCase.md) and [`$sendNotification`](./sendNotification.md) functions. | ❌ | ✅ |
42-
Access to ["Awaited Reactions"](./awaitedReactions.md). | ❌ | ✅ |
43-
Access to ["Custom Images"](./customImage.md). | ❌ | ✅ |
44-
Access to use `$getServerVar[]` in triggers. [(Custom prefixes)](./customPrefixes.md) | ❌ | ✅ |
45-
Access to the "Bot guild (server) list" in the app. | ❌ | ✅ |
46-
Access to the ["Embed builder"](./embedBuilder.md) in the app. | ❌ | ✅ |
47-
Sharding. | ❌ | ✅ |
48-
Priority bot hosting and startup. | ❌ | ✅ |
49-
Ad-free hosting time. | ✅ | ✅ |
50-
Character limit per code. | 65k | 65k |
51-
Variable limit. | 100 | ∞ |
52-
Command limit. | 230 | ∞ |
53-
Maximum time in the "Time" parameter in `$replyIn[]`, `$editIn[]`, `$deleteIn[]` and `$editEmbedIn[]` functions. | 40m | 120m |
54-
Server & Global variable value character limit. | 499 | 4999 |
55-
User variable value character limit. | 4999 | 4999 |
56-
Channel variable value character limit. | 499 | 499 |
34+
| Feature | Without premium | With premium |
35+
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------|--------------|
36+
| Access to AI functions. ([`$ai[]`](./ai.md), [`$aiDecide[]`](./aiDecide.md), [`$aiWithCtx[]`](./aiWithCtx.md), [`$aiDecideWithCtx[]`](./aiDecideWithCtx.md) and [`$aiQuota`](./aiQuota.md)) | | |
37+
| AI Tokens (per day) | 0 | 10000 |
38+
| Access to Bot Logs and to Bot Logs functions. (`$log[]`, `$disableErrorLogging` and `$logQuota`) | | |
39+
| Logs Quota (per day) | 0 | 3000 |
40+
| Access to [`$messageContains[]`](./messageContains.md) and [`$alwaysReply`](./alwaysReply.md) callbacks. | | |
41+
| Access to [`$ignoreTriggerCase`](./ignoreTriggerCase.md) and [`$sendNotification`](./sendNotification.md) functions. | | |
42+
| Access to ["Awaited Reactions"](./awaitedReactions.md). | | |
43+
| Access to ["Custom Images"](./customImage.md). | | |
44+
| Access to use `$getServerVar[]` in triggers. [(Custom prefixes)](./customPrefixes.md) | | |
45+
| Access to the "Bot guild (server) list" in the app. | | |
46+
| Access to the ["Embed builder"](./embedBuilder.md) in the app. | | |
47+
| Sharding. | | |
48+
| Priority bot hosting and startup. | | |
49+
| Ad-free hosting time. | | |
50+
| Character limit per code. | 65k | 65k |
51+
| Variable limit. | 100 | |
52+
| Command limit. | 230 | |
53+
| Maximum time in the "Time" parameter in `$replyIn[]`, `$editIn[]`, `$deleteIn[]` and `$editEmbedIn[]` functions. | 40m | 120m |
54+
| Server & Global variable value character limit. | 499 | 4999 |
55+
| User variable value character limit. | 4999 | 4999 |
56+
| Channel variable value character limit. | 499 | 499 |
5757

5858
#### [Discord Server](https://discord.gg/bot-designer-for-discord-official-server-566363823137882154) Perks
5959
- The premium role. Run `/getPremiumRole`.

0 commit comments

Comments
 (0)