Skip to content

Commit ef80ca0

Browse files
committed
Merge branch 'main' of https://github.com/raspdevpy/ccdoc into main
2 parents 40743cc + 31ffe57 commit ef80ca0

87 files changed

Lines changed: 2250 additions & 1841 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
48.6 KB
Binary file not shown.
616 KB
Binary file not shown.

guide/.vuepress/styles/index.scss

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
@font-face {
2+
font-family: 'Assistant-Medium';
3+
src: url('/fonts/Assistant-Medium.ttf') format('truetype');
4+
font-style: normal;
5+
font-weight: normal;
6+
}
7+
@font-face {
8+
font-family: 'Noto-Sans-Medium';
9+
src: url('/fonts/NotoSans-Medium.ttf') format('truetype');
10+
font-style: normal;
11+
font-weight: normal;
12+
}
13+
.discord-messages {
14+
background-color: #202024 !important;
15+
border: 1px solid #3f4245 !important;
16+
}
17+
.discord-messages,
18+
.discord-messages * {
19+
font-family: 'Assistant-Medium', sans-serif !important;
20+
}
21+
.discord-message .discord-author-info .discord-author-username {
22+
font-family: 'Noto-Sans-Medium', sans-serif !important;
23+
font-size: 0.95rem !important;
24+
letter-spacing: 0px !important;
25+
display: inline-flex !important;
26+
}
27+
.discord-message .discord-message-body {
28+
font-size: 15px !important;
29+
}
30+
.discord-message .discord-message-content .discord-message-timestamp {
31+
display: inline-flex !important;
32+
font-size: 11px !important;
33+
margin-left: 5px !important;
34+
}

guide/Member/authorAvatar.md

Lines changed: 23 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,81 +1,44 @@
11
# $authorAvatar
22

3-
Returns the URL to the User's avatar that triggered the command.
4-
5-
::: tip Discord adds image to message if link provided <Badge type="tip" text="Read examples section" vertical="middle"/>
6-
If a message contains only a link to an image, Discord sends **only** the image.
7-
8-
If a message has a link to an image AND some text, Discord sends **both** the link and the image.
9-
10-
To add image without posting the link use [$attachment](../Text/Embed/attachment.md)
11-
12-
To send link as a plain text wrap the function into graves like<code>\`$authorAvatar\`</code>
13-
:::
3+
Returns the avatar (profile picture) URL of the user who executed the command.
144

155
## Usage
166

177
```bash
18-
$authorAvatar[Return Server Avatar Instead (yes/no, default is no)]
8+
$authorAvatar[serverAvatar]
199
```
10+
1. **serverAvatar** - (Optional) default value: `no`. Can be `yes` or `no`. Discord does have two types of avatars, global and per-server (custom avatar in each server). If no server avatar is set, the global avatar will be used.
2011

2112
## Examples
2213

23-
### Message contains text and link to image
14+
#### Sending avatar URL
2415

25-
<discord-messages>
26-
<discord-message :bot="false" role-color="#ffcc9a" author="crochet" avatar="https://cdn.discordapp.com/avatars/808007806266769458/768de61c5d90024e100ec5c058d3c2fe.webp?size=4096" >
27-
!!exec My avatar link: $authorAvatar<br/>
28-
Image attached below:
29-
</discord-message>
30-
<discord-message :bot="true" role-color="#0099ff" author="Custom Command" avatar="https://media.discordapp.net/avatars/725721249652670555/781224f90c3b841ba5b40678e032f74a.webp" >
31-
My avatar link:
32-
<a href="https://cdn.discordapp.com/avatars/808007806266769458/768de61c5d90024e100ec5c058d3c2fe.webp?size=4096">
33-
https://cdn.discordapp.com/avatars/808007806266769458/768de61c5d90024e100ec5c058d3c2fe.webp?size=4096
34-
</a><br/>
35-
Image attached below:
36-
<DiscordReaction image="https://cdn.discordapp.com/avatars/808007806266769458/768de61c5d90024e100ec5c058d3c2fe.webp?size=4096"></DiscordReaction>
37-
</discord-message>
38-
</discord-messages>
39-
40-
### Message contains only link to image
16+
How is the avatar URL displayed when sent with text and without text
4117

42-
::: details Example
4318
<discord-messages>
44-
<discord-message :bot="false" role-color="#ffcc9a" author="crochet" avatar="https://cdn.discordapp.com/avatars/808007806266769458/768de61c5d90024e100ec5c058d3c2fe.webp?size=4096" >
45-
!!exec $authorAvatar
19+
<discord-message :bot="false" role-color="#d6e0ff" author="User" avatar="https://cdn.discordapp.com/embed/avatars/0.png">
20+
!!exec With text: $authorAvatar
4621
</discord-message>
47-
<discord-message :bot="true" role-color="#0099ff" author="Custom Command" avatar="https://media.discordapp.net/avatars/725721249652670555/781224f90c3b841ba5b40678e032f74a.webp" >
48-
<DiscordReaction image="https://cdn.discordapp.com/avatars/808007806266769458/768de61c5d90024e100ec5c058d3c2fe.webp?size=4096"></DiscordReaction>
22+
<discord-message :bot="true" role-color="#5fb0fa" author="Custom Command" avatar="https://doc.ccommandbot.com/bot-profile.png">
23+
With text: <a href="https://cdn.discordapp.com/embed/avatars/0.png">
24+
https://cdn.discordapp.com/embed/avatars/0.png
25+
</a><br>
26+
<img src="https://cdn.discordapp.com/embed/avatars/0.png" alt="User Avatar" style="vertical-align: text-bottom;" />
4927
</discord-message>
50-
</discord-messages>
51-
:::
52-
53-
### Send text and image without link
54-
55-
::: details Example
56-
<discord-messages>
57-
<discord-message :bot="false" role-color="#ffcc9a" author="crochet" avatar="https://cdn.discordapp.com/avatars/808007806266769458/768de61c5d90024e100ec5c058d3c2fe.webp?size=4096" >
58-
!!exec No link, only text and image<br/>
59-
$attachment[$authorAvatar]
28+
<discord-message :bot="false" role-color="#d6e0ff" author="User" avatar="https://cdn.discordapp.com/embed/avatars/0.png">
29+
!!exec $authorAvatar
6030
</discord-message>
61-
<discord-message :bot="true" role-color="#0099ff" author="Custom Command" avatar="https://media.discordapp.net/avatars/725721249652670555/781224f90c3b841ba5b40678e032f74a.webp" >
62-
No link, only text and image
63-
<DiscordReaction image="https://cdn.discordapp.com/avatars/808007806266769458/768de61c5d90024e100ec5c058d3c2fe.webp?size=4096"></DiscordReaction>
31+
<discord-message :bot="true" role-color="#5fb0fa" author="Custom Command" avatar="https://doc.ccommandbot.com/bot-profile.png">
32+
<img src="https://cdn.discordapp.com/embed/avatars/0.png" alt="User Avatar" style="vertical-align: text-bottom;" />
6433
</discord-message>
6534
</discord-messages>
35+
36+
::: tip Note
37+
You can send the image as an attachment, so no link will be displayed. For this, you can use function [$attachment](../Text/Embed/attachment.md).
38+
To display the avatar URL as plain text, either enclose the function in backticks (`` `$authorAvatar` ``) or angle brackets (`<$authorAvatar>`).
6639
:::
6740

68-
### Send link as plain text
41+
##### Related functions: [$attachment](../Text/Embed/attachment.md)
6942

70-
::: details Example
71-
<discord-messages>
72-
<discord-message :bot="false" role-color="#ffcc9a" author="crochet" avatar="https://cdn.discordapp.com/avatars/808007806266769458/768de61c5d90024e100ec5c058d3c2fe.webp?size=4096" >
73-
!!exec <DiscordMarkdown>`$authorAvatar`</DiscordMarkdown><br/>
74-
</discord-message>
75-
<discord-message :bot="true" role-color="#0099ff" author="Custom Command" avatar="https://media.discordapp.net/avatars/725721249652670555/781224f90c3b841ba5b40678e032f74a.webp" >
76-
<DiscordMarkdown>
77-
`https://cdn.discordapp.com/avatars/808007806266769458/768de61c5d90024e100ec5c058d3c2fe.webp?size=4096`
78-
</DiscordMarkdown>
79-
</discord-message>
80-
</discord-messages>
81-
:::
43+
##### Function difficulty: <Badge type="tip" text="Easy" vertical="middle"/>
44+
###### Tags: <Badge type="tip" text="Image" vertical="middle"/> <Badge type="tip" text="Avatar" vertical="middle"/> <Badge type="tip" text="Attachment" vertical="middle"/> <Badge type="tip" text="profile picture" vertical="middle"/>

guide/Member/authorAvatar_ai.md

Lines changed: 22 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,44 @@
11
# $authorAvatar
22

3-
This function returns the URL of the avatar for the user who triggered the command.
4-
5-
::: tip Important Considerations
6-
Discord automatically embeds images when a link to an image is included in a message. See the examples below to understand the different ways Discord handles image links.
7-
- If a message contains *only* a link to an image, Discord sends only the image embed.
8-
- If a message contains a link to an image *and* additional text, Discord sends both the link and the image embed.
9-
10-
To send the image as an attachment *without* displaying the link, use the [$attachment](../Text/Embed/attachment.md) function.
11-
12-
To display the avatar URL as plain text (without embedding the image), enclose the function in backticks: `` `$authorAvatar` ``.
13-
:::
3+
Returns the avatar (profile picture) URL of the user who executed the command.
144

155
## Usage
166

177
```bash
18-
$authorAvatar[Return Server Avatar Instead (yes/no, default is no)]
8+
$authorAvatar[serverAvatar]
199
```
20-
21-
## Arguments
22-
23-
* `Return Server Avatar Instead (yes/no, default is no)`: An optional argument. If set to `yes`, the function will return the user's server avatar (if they have one) instead of their global avatar. Defaults to `no`.
10+
1. **serverAvatar** - (Optional) default value: `no`. Can be `yes` or `no`. Discord does have two types of avatars, global and per-server (custom avatar in each server). If no server avatar is set, the global avatar will be used.
2411

2512
## Examples
2613

27-
### Sending the Avatar URL with Text
14+
#### Sending avatar URL
2815

29-
This example demonstrates how the avatar URL is displayed when sent with accompanying text.
16+
How is the avatar URL displayed when sent with text and without text
3017

3118
<discord-messages>
32-
<discord-message :bot="false" role-color="#ffcc9a" author="crochet" avatar="https://cdn.discordapp.com/avatars/808007806266769458/768de61c5d90024e100ec5c058d3c2fe.webp?size=4096" >
33-
!!exec My avatar link: $authorAvatar<br/>
34-
Image attached below:
35-
</discord-message>
36-
<discord-message :bot="true" role-color="#0099ff" author="Custom Command" avatar="https://media.discordapp.net/avatars/725721249652670555/781224f90c3b841ba5b40678e032f74a.webp" >
37-
My avatar link:
38-
<a href="https://cdn.discordapp.com/avatars/808007806266769458/768de61c5d90024e100ec5c058d3c2fe.webp?size=4096">
39-
https://cdn.discordapp.com/avatars/808007806266769458/768de61c5d90024e100ec5c058d3c2fe.webp?size=4096
40-
</a><br/>
41-
Image attached below:
42-
<DiscordReaction image="https://cdn.discordapp.com/avatars/808007806266769458/768de61c5d90024e100ec5c058d3c2fe.webp?size=4096"></DiscordReaction>
19+
<discord-message :bot="false" role-color="#d6e0ff" author="User" avatar="https://cdn.discordapp.com/embed/avatars/0.png">
20+
!!exec With text: $authorAvatar
4321
</discord-message>
44-
</discord-messages>
45-
46-
### Sending Only the Avatar URL
47-
48-
This example demonstrates how the avatar is embedded when *only* the avatar URL is sent in the message.
49-
50-
::: details Example
51-
<discord-messages>
52-
<discord-message :bot="false" role-color="#ffcc9a" author="crochet" avatar="https://cdn.discordapp.com/avatars/808007806266769458/768de61c5d90024e100ec5c058d3c2fe.webp?size=4096" >
22+
<discord-message :bot="true" role-color="#5fb0fa" author="Custom Command" avatar="https://doc.ccommandbot.com/bot-profile.png">
23+
With text: <a href="https://cdn.discordapp.com/embed/avatars/0.png">
24+
https://cdn.discordapp.com/embed/avatars/0.png
25+
</a><br>
26+
<img src="https://cdn.discordapp.com/embed/avatars/0.png" alt="User Avatar" style="vertical-align: text-bottom;" />
27+
</discord-message>
28+
<discord-message :bot="false" role-color="#d6e0ff" author="User" avatar="https://cdn.discordapp.com/embed/avatars/0.png">
5329
!!exec $authorAvatar
5430
</discord-message>
55-
<discord-message :bot="true" role-color="#0099ff" author="Custom Command" avatar="https://media.discordapp.net/avatars/725721249652670555/781224f90c3b841ba5b40678e032f74a.webp" >
56-
<DiscordReaction image="https://cdn.discordapp.com/avatars/808007806266769458/768de61c5d90024e100ec5c058d3c2fe.webp?size=4096"></DiscordReaction>
31+
<discord-message :bot="true" role-color="#5fb0fa" author="Custom Command" avatar="https://doc.ccommandbot.com/bot-profile.png">
32+
<img src="https://cdn.discordapp.com/embed/avatars/0.png" alt="User Avatar" style="vertical-align: text-bottom;" />
5733
</discord-message>
5834
</discord-messages>
59-
:::
60-
61-
### Sending the Avatar as an Attachment (Without the Link)
62-
63-
This example demonstrates how to send the avatar as an attachment *without* including the direct link in the message. This is achieved using the `$attachment` function.
6435

65-
::: details Example
66-
<discord-messages>
67-
<discord-message :bot="false" role-color="#ffcc9a" author="crochet" avatar="https://cdn.discordapp.com/avatars/808007806266769458/768de61c5d90024e100ec5c058d3c2fe.webp?size=4096" >
68-
!!exec No link, only text and image<br/>
69-
$attachment[$authorAvatar]
70-
</discord-message>
71-
<discord-message :bot="true" role-color="#0099ff" author="Custom Command" avatar="https://media.discordapp.net/avatars/725721249652670555/781224f90c3b841ba5b40678e032f74a.webp" >
72-
No link, only text and image
73-
<DiscordReaction image="https://cdn.discordapp.com/avatars/808007806266769458/768de61c5d90024e100ec5c058d3c2fe.webp?size=4096"></DiscordReaction>
74-
</discord-message>
75-
</discord-messages>
36+
::: tip Note
37+
You can send the image as an attachment, so no link will be displayed. For this, you can use function [$attachment](../Text/Embed/attachment.md).
38+
To display the avatar URL as plain text, either enclose the function in backticks (`` `$authorAvatar` ``) or angle brackets (`<$authorAvatar>`).
7639
:::
7740

78-
### Sending the Avatar URL as Plain Text
79-
80-
This example demonstrates how to display the avatar URL as plain text instead of embedding the image. This is done by wrapping the function call in backticks.
41+
##### Related functions: [$attachment](../Text/Embed/attachment.md)
8142

82-
::: details Example
83-
<discord-messages>
84-
<discord-message :bot="false" role-color="#ffcc9a" author="crochet" avatar="https://cdn.discordapp.com/avatars/808007806266769458/768de61c5d90024e100ec5c058d3c2fe.webp?size=4096" >
85-
!!exec <DiscordMarkdown>`$authorAvatar`</DiscordMarkdown><br/>
86-
</discord-message>
87-
<discord-message :bot="true" role-color="#0099ff" author="Custom Command" avatar="https://media.discordapp.net/avatars/725721249652670555/781224f90c3b841ba5b40678e032f74a.webp" >
88-
<DiscordMarkdown>
89-
`https://cdn.discordapp.com/avatars/808007806266769458/768de61c5d90024e100ec5c058d3c2fe.webp?size=4096`
90-
</DiscordMarkdown>
91-
</discord-message>
92-
</discord-messages>
93-
:::
43+
##### Function difficulty: <Badge type="tip" text="Easy" vertical="middle"/>
44+
###### Tags: <Badge type="tip" text="Image" vertical="middle"/> <Badge type="tip" text="Avatar" vertical="middle"/> <Badge type="tip" text="Attachment" vertical="middle"/> <Badge type="tip" text="profile picture" vertical="middle"/>

guide/Member/authorID.md

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,29 @@
11
# $authorID
2-
Returns the ID of the User that triggered the command.
32

4-
#### Usage: `$authorID`
5-
<br/>
3+
Returns the ID of the user who executed the command.
4+
5+
## Usage
6+
7+
```bash
8+
$authorID
9+
```
10+
11+
## Example
12+
13+
#### Using $authorID
14+
15+
How to use $authorID
16+
617
<discord-messages>
7-
<discord-message :bot="false" role-color="#ffcc9a" author="User">
8-
!!exec $authorID
9-
</discord-message>
10-
<discord-message :bot="true" role-color="#0099ff" author="Custom Command" avatar="https://media.discordapp.net/avatars/725721249652670555/781224f90c3b841ba5b40678e032f74a.webp">
11-
683630053686378498
12-
</discord-message>
18+
<discord-message :bot="false" role-color="#d6e0ff" author="User" avatar="https://cdn.discordapp.com/embed/avatars/0.png">
19+
!!exec My ID is $authorID
20+
</discord-message>
21+
<discord-message :bot="true" role-color="#5fb0fa" author="Custom Command" avatar="https://doc.ccommandbot.com/bot-profile.png">
22+
My ID is 123456789123456789
23+
</discord-message>
1324
</discord-messages>
1425

15-
::: tip Related Functions
16-
[$mention](../Member/mention.md) ― to mention the author of a command!
17-
:::
26+
##### Related functions: [$mention](../Member/mention.md)
1827

19-
##### Function difficulty: <Badge type="tip" text="Easy" vertical="middle" />
20-
###### Tags: <Badge type="tip" text="authorID" vertical="middle" /> <Badge type="tip" text="cmd executor" vertical="middle" /> <Badge type="tip" text="command author" vertical="middle" /> <Badge type="tip" text="command" vertical="middle" /> <Badge type="tip" text="userID" vertical="middle" />
28+
##### Function Difficulty: <Badge type="tip" text="Easy" vertical="middle" />
29+
###### Tags: <Badge type="tip" text="authorID" vertical="middle" /> <Badge type="tip" text="executor" vertical="middle" /> <Badge type="tip" text="command author" vertical="middle" /> <Badge type="tip" text="" vertical="middle" /> <Badge type="tip" text="userID" vertical="middle" />

guide/Member/authorID_ai.md

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
11
# $authorID
22

3-
This function retrieves the unique ID of the user who executed the command. This ID can be used in other functions or for logging purposes.
3+
Returns the ID of the user who executed the command.
44

5-
#### Usage: `$authorID`
5+
## Usage
66

7-
<br/>
7+
```bash
8+
$authorID
9+
```
810

9-
Here's an example of how `$authorID` works:
11+
## Example
12+
13+
#### Using $authorID
14+
15+
How to use $authorID
1016

1117
<discord-messages>
12-
<discord-message :bot="false" role-color="#ffcc9a" author="User">
13-
!!exec $authorID
14-
</discord-message>
15-
<discord-message :bot="true" role-color="#0099ff" author="Custom Command" avatar="https://media.discordapp.net/avatars/725721249652670555/781224f90c3b841ba5b40678e032f74a.webp">
16-
683630053686378498
17-
</discord-message>
18+
<discord-message :bot="false" role-color="#d6e0ff" author="User" avatar="https://cdn.discordapp.com/embed/avatars/0.png">
19+
!!exec My ID is $authorID
20+
</discord-message>
21+
<discord-message :bot="true" role-color="#5fb0fa" author="Custom Command" avatar="https://doc.ccommandbot.com/bot-profile.png">
22+
My ID is 123456789123456789
23+
</discord-message>
1824
</discord-messages>
1925

20-
In this example, the user executed the command `!!exec $authorID`. The custom command then returned the user's ID: `683630053686378498`.
21-
22-
::: tip Related Functions
23-
[$mention](../Member/mention.md) ― Use this function to mention the author of a command within a message!
24-
:::
26+
##### Related functions: [$mention](../Member/mention.md)
2527

2628
##### Function Difficulty: <Badge type="tip" text="Easy" vertical="middle" />
27-
28-
###### Tags: <Badge type="tip" text="authorID" vertical="middle" /> <Badge type="tip" text="cmd executor" vertical="middle" /> <Badge type="tip" text="command author" vertical="middle" /> <Badge type="tip" text="command" vertical="middle" /> <Badge type="tip" text="userID" vertical="middle" />
29+
###### Tags: <Badge type="tip" text="authorID" vertical="middle" /> <Badge type="tip" text="executor" vertical="middle" /> <Badge type="tip" text="command author" vertical="middle" /> <Badge type="tip" text="" vertical="middle" /> <Badge type="tip" text="userID" vertical="middle" />

0 commit comments

Comments
 (0)