Skip to content

Commit 81bbe30

Browse files
committed
Merge branch 'main' into beta
2 parents 32151da + a8e8d02 commit 81bbe30

507 files changed

Lines changed: 14352 additions & 1690 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

DockerfileDev

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Stage 1 — build the static assets
2+
FROM node:20-alpine3.21 AS builder
3+
WORKDIR /app
4+
5+
COPY package*.json ./
6+
RUN npm ci
7+
8+
COPY . .
9+
10+
CMD ["npm", "run", "dev"]

README.md

Lines changed: 53 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,60 @@
1-
# ccdoc
2-
Custom Command Documentation
1+
# Getting Started with Custom Command Bot
32

4-
# How to contribute?
5-
You can contribute by forking this repo, [click here](https://github.com/raspdevpy/ccdoc/fork), modify the changes, then Pull request.
3+
:::tip Important: Read This First!
4+
To get the most out of Custom Command Bot and avoid confusion, we highly recommend reading this guide in its entirety. Understanding the concepts presented here will make creating and managing custom commands much easier.
5+
:::
66

7-
# How to run?
7+
## What is Custom Command Bot?
8+
9+
Custom Command Bot empowers you to create fully customizable commands for your Discord server. It's a versatile tool suitable for both experienced developers and beginners who want a simple and effective way to enhance their server's functionality.
10+
11+
### How Do Custom Commands Work?
12+
13+
As the name suggests, custom commands are entirely customizable! You have the flexibility to define almost any action that a Discord bot can perform, tailored to your specific needs.
14+
15+
### Do I Need Coding Experience?
16+
17+
No coding experience is required! Custom Command Bot uses an easy-to-learn pseudo-language designed specifically for straightforward Discord bot development.
18+
19+
## Inviting the Bot to Your Server
20+
21+
Adding Custom Command Bot to your server is a breeze. Just follow these simple steps:
22+
23+
1. **Invite the Bot:** Click [this link](https://discord.com/api/oauth2/authorize?client_id=725721249652670555&permissions=268561655&scope=bot) to invite the bot to your server.
24+
25+
> ![](https://i.imgur.com/NQp3N8L.png)
26+
27+
:::details Permissions
28+
We recommend keeping all the preset permissions during the invitation process. This will prevent future issues caused by the bot lacking necessary permissions. If you have security concerns, please refer to our Privacy Policy accessible via [this link](https://doc.ccommandbot.com/Guide/policy.html).
29+
> ![](https://i.imgur.com/7WnDcnG.png)
30+
:::
31+
32+
2. **Log in to the Dashboard:** Go to the [Dashboard](https://ccommandbot.com) and log in.
33+
34+
> ![](https://i.imgur.com/pvJ3i6R.png)
35+
36+
3. **Select Your Server:** Choose the server you want to manage from the dashboard.
37+
38+
> ![](https://i.imgur.com/XxSsZ4G.png)
39+
40+
## Creating Your First Custom Commands
41+
42+
With the bot successfully added to your server, you're now ready to unleash your creativity and build your own custom commands!
43+
44+
Head over to [the full guide](../Guide/1.create.md) to learn how to create your first command.
45+
46+
# How to run
47+
48+
## Without Docker
849
Required: Node 18.x, npm
950

1051
1. run `git clone https://github.com/raspdevpy/ccdoc`
1152
2. run `npm install`
1253
3. run `npm run dev`, and head to `https://localhost:8080`
54+
55+
## With Docker
56+
If docker and docker compose is installed in your system
57+
58+
1. run `git clone https://github.com/raspdevpy/ccdoc`
59+
2. run `docker compose up`
60+
3. head to `https://localhost:8080`

docker-compose.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
services:
2+
ccdoc-dev:
3+
build:
4+
context: .
5+
dockerfile: DockerfileDev
6+
volumes:
7+
- .:/app
8+
- /app/node_modules
9+
ports:
10+
- 8080:8080
11+
command: npm run dev
12+
volumes:
13+
redis_data:

guide/.vuepress/config.js

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
const sidebar = require('./sidebar');
22
const parseTag = require('./parseTags');
33
const replacements = require('./replacements');
4+
const fs = require('fs')
45
const replacePageContent = (content, replacements) => {
56
let output = content;
67
for (const [placeholder, replacement] of Object.entries(replacements)) {
@@ -11,10 +12,23 @@ const replacePageContent = (content, replacements) => {
1112
};
1213
module.exports = {
1314
lang: 'en-US',
14-
title: 'Custom Command Bot',
15-
description: 'The documentation of Custom Command bot',
15+
title: 'Custom Command',
16+
description: 'Custom Command Bot\'s Documentation',
1617
theme: '@vuepress/default',
17-
head: [['link', { rel: 'icon', href: '/favicon.ico' }]],
18+
head: [
19+
['link', { rel: 'icon', href: 'https://doc.ccommandbot.com/bot-profile.png' }],
20+
['meta', { name: 'theme-color', content: '#74b0f7' }],
21+
22+
['meta', { property: 'og:title', content: 'Custom Command Bot' }],
23+
['meta', { property: 'og:description', content: 'Custom Command Bot\'s Documentation' }],
24+
['meta', { property: 'og:image', content: 'https://doc.ccommandbot.com/bot-profile.png' }],
25+
['meta', { property: 'og:url', content: 'https://ccommandbot.com' }],
26+
27+
28+
['meta', { name: 'twitter:title', content: 'Custom Command Bot' }],
29+
['meta', { name: 'twitter:description', content: 'Custom Command Bot\'s Documentation' }],
30+
['meta', { name: 'twitter:image', content: 'https://doc.ccommandbot.com/bot-profile.png' }]
31+
],
1832
//plugins: ['@vuepress/plugin-container'],
1933
plugins: [
2034
(options, context) => ({
@@ -31,6 +45,14 @@ module.exports = {
3145
}),
3246
['@vuepress/plugin-search',{
3347
maxSuggestions:15,
48+
isSearchable:(page)=>{
49+
if(!page.data.filePathRelative) return true;
50+
if(page.data.filePathRelative.endsWith('_ai.md'))
51+
return true;
52+
let aiFile = __dirname+'/../'+page.data.filePathRelative.replace('.md','_ai.md');
53+
if(fs.existsSync(aiFile)) return false;
54+
return true;
55+
},
3456
getExtraFields: (page) =>parseTag(page),
3557
}],
3658
['@vuepress/plugin-container'],
@@ -53,7 +75,7 @@ module.exports = {
5375
repo: 'raspdevpy/ccdoc',
5476
contributors:false,
5577
search: true,
56-
logo: 'https://cdn.discordapp.com/icons/832255686783533066/f7131f694c6e1a2bd9c360d8b525d4e3.webp',
78+
logo: '/favicon.ico',
5779
editLinks: true,
5880
editLinkText: 'Improve This Page!',
5981
lastUpdated: true,
242 KB
Loading
48.6 KB
Binary file not shown.
616 KB
Binary file not shown.

guide/.vuepress/sidebar.js

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,17 @@ function getSideBar(folder, title, options={}) {
1212
fs.statSync(path.join(`${__dirname}/../${folder}`, item)).isFile() &&
1313
extension.includes(path.extname(item))
1414
);
15-
for (let i = 0; i < files.length; i++) {
16-
let name = files[i]
17-
//-files[i]={text:name,link:`/${folder}/${name}`}
18-
files[i]=`/${folder}/${name}`
19-
}
20-
return { text: title, children: files, collapsible:false,...options};
15+
let aiRefinedFiles = files.filter(file=>file.endsWith('_ai.md'));
16+
17+
let children = [];
18+
files.forEach(name=>{
19+
if(name.endsWith('_ai.md')) return;
20+
if(aiRefinedFiles.includes(name.replace('.md', '_ai.md')))
21+
children.push(`/${folder}/${name.replace('.md', '_ai.md')}`)
22+
else
23+
children.push(`/${folder}/${name}`)
24+
})
25+
return { text: title, children, collapsible:false,...options};
2126

2227

2328
}
@@ -73,7 +78,7 @@ module.exports= {
7378
getSideBar('Cooldown','Cooldown functions',{collapsible:true}),
7479
getSideBar('Request','Http Requests functions',{collapsible:true}),
7580
getSideBar('Image','Image Builder functions',{collapsible:true}),
76-
getSideBar('Unclassified','Unclassfied Functions',{collapsible:true})
81+
// getSideBar('Unclassified','Unclassfied Functions',{collapsible:true})
7782
]
7883
},
7984
getSideBar('Contribution_Info','Contribute'),

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/Bot/botCount.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
# $botCount
2-
Returns the amount of bots in your server/guild!
2+
3+
This function returns the total number of bots present in your Discord server (guild).
34

45
#### Usage: `$botCount`
5-
<br/>
6+
7+
Here's how you can use the `$botCount` function:
8+
9+
```
10+
!!exec There are `$botCount` bots in the server!
11+
```
12+
13+
This command, when executed, will display a message showing the bot count in the server. See the example below:
14+
615
<discord-messages>
716
<discord-message :bot="false" role-color="#ffcc9a" author="Member">
817
!!exec There are `$botCount` bots in the server!
@@ -12,5 +21,10 @@ Returns the amount of bots in your server/guild!
1221
</discord-message>
1322
</discord-messages>
1423

15-
##### Function Difficulty: <Badge type="tip" text="Easy" vertical="middle" />
16-
###### Tags: <Badge type="tip" text="bots" vertical="middle" /> <Badge type="tip" text="count" vertical="middle" /> <Badge type="tip" text="amount of bots" vertical="middle" /> <Badge type="tip" text="return number" vertical="middle" />
24+
::: danger Warning
25+
The bot count is retrieved from the bot's cache, not directly from the Discord API. This means the count might not be perfectly accurate, especially if all server members haven't been fully cached. Full caching is typically achieved at higher bot tiers (Tier 5).
26+
:::
27+
28+
##### Function Difficulty: <Badge type="tip" text="Easy" vertical="middle" />
29+
30+
###### Tags: <Badge type="tip" text="bots" vertical="middle" /> <Badge type="tip" text="count" vertical="middle" /> <Badge type="tip" text="amount of bots" vertical="middle" /> <Badge type="tip" text="return number" vertical="middle" />

0 commit comments

Comments
 (0)