Skip to content

Latest commit

ย 

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ• โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ–ˆโ–ˆโ–ˆโ–ˆโ•”โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—
โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ• โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ•šโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ•
โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•‘ โ•šโ•โ• โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ•šโ•โ• โ•šโ•โ•โ•šโ•โ•โ•โ•โ•โ•โ•โ•šโ•โ• โ•šโ•โ•โ•šโ•โ•โ•โ•โ•โ• โ•šโ•โ• โ•šโ•โ•โ•šโ•โ•โ•โ•โ•โ•โ•


CB Community โ€” Technical Documentation

Official CB Studios Discord Community Bot

Version: 1.0.0
Author: CB Studios
Type: Discord Community Bot


Resource Overview

CB Community is the official Discord community bot developed for the CB Studios ecosystem.

The bot provides centralized tools for community management, moderation, support workflows, automation, temporary voice channels, welcome systems, self-roles, logging, status utilities and administrative operations.

This documentation is intended for administrators, developers and staff members responsible for deploying, configuring or maintaining CB Community.


Features

๐Ÿ›ก๏ธ Moderation

โ€ข Server moderation utilities
โ€ข Permission-aware administrative commands
โ€ข Moderation and management tools

๐ŸŽซ Support & Tickets

โ€ข Ticket creation and management
โ€ข Ticket claiming
โ€ข Ticket closing and reopening
โ€ข Transcript workflows
โ€ข Staff support utilities

๐Ÿ‘‹ Welcome System

โ€ข Automated member welcome messages
โ€ข Configurable welcome behavior
โ€ข Automatic role assignment

๐ŸŽญ Self Roles

โ€ข Interactive role selection
โ€ข Role management utilities
โ€ข Protected-role handling

๐Ÿ”Š Temporary Voice Channels

โ€ข Temporary voice channel creation
โ€ข Automatic channel management
โ€ข Cleanup of inactive temporary channels

๐Ÿ“ข Community Automation

โ€ข Automated Discord workflows
โ€ข Community announcements
โ€ข Discord event handling
โ€ข Server automation tools

๐Ÿ“Š Status & Utilities

โ€ข Bot status information
โ€ข Runtime information
โ€ข Uptime information
โ€ข Health and diagnostic utilities

๐Ÿงฐ Developer Tools

โ€ข Private developer commands
โ€ข Module information
โ€ข Health checks
โ€ข Operational diagnostics

๐Ÿ’พ Persistent Storage

โ€ข SQLite database
โ€ข Automatic database migrations
โ€ข Persistent community configuration
โ€ข Local data storage


Requirements

The following components are required to run CB Community:

โ€ข Node.js
โ€ข npm
โ€ข A Discord application
โ€ข A Discord bot
โ€ข A Discord server where the bot will operate

The bot must have the Discord permissions required by the modules enabled on the server.


Installation

1. Download the Repository

Clone or download the CB Community repository.

git clone https://github.com/Pichirin-CB/cb-community-bot.git

2. Install Dependencies

Open a terminal inside the project directory and run:

npm install

3. Configure Environment Variables

Create a .env file using .env.example as the template.

Example:

DISCORD_TOKEN=
DISCORD_CLIENT_ID=
DISCORD_GUILD_ID=

DATABASE_PATH=./data/cb_community.sqlite
NODE_ENV=development
LOG_LEVEL=info
BOT_PRESENCE=Con la comunidad ๐ŸŽฎ

Additional environment variables may be required depending on the enabled features and modules.

4. Deploy Discord Commands

Deploy the slash commands:

npm run deploy:commands

On Windows, you can also use:

deploy-commands.bat

5. Build the Project

npm run build

6. Start the Bot

npm start

Configuration

Configuration is primarily handled through environment variables.

The main configuration file is:

.env

Use .env.example as the reference configuration.

Discord Configuration

DISCORD_TOKEN=
DISCORD_CLIENT_ID=
DISCORD_GUILD_ID=

Application Configuration

NODE_ENV=development
LOG_LEVEL=info
BOT_PRESENCE=Con la comunidad ๐ŸŽฎ

Database Configuration

DATABASE_PATH=./data/cb_community.sqlite

Never commit .env files containing private credentials.


Database

CB Community uses SQLite for persistent local storage.

Default database:

data/cb_community.sqlite

Database migrations are handled by the project's migration system.

To manually execute migrations:

npm run db:migrate

Database Migration Warning

If upgrading an existing installation, always create a backup of the current database before changing database paths or applying structural changes.

Never delete an existing production database during an update.


Logs

Application logs are stored inside:

logs/

The main application log is:

logs/cb-community.log

Logs should be reviewed when troubleshooting startup errors, Discord connection problems or module failures.


Development

Run the bot in development mode:

npm run dev

Development mode is intended for local development and testing.


Build

Compile the TypeScript project:

npm run build

The compiled application is generated in the project's distribution directory.


Validation

Before deploying changes, run:

npm run build
npm run lint
npm run test

All available checks should complete successfully before deploying a modified production build.


Windows Utilities

The repository includes Windows helper scripts for common operations.

start.bat
stop.bat
status.bat
deploy-commands.bat
test.bat

These scripts are intended to simplify local administration of CB Community on Windows systems.


Updating CB Community

To update an existing installation:

1. Stop the Bot

Stop the currently running CB Community process.

2. Backup the Database

Create a backup of:

data/cb_community.sqlite

3. Update the Source Files

Replace the project files with the new version.

4. Install Dependencies

npm install

5. Apply Database Migrations

npm run db:migrate

6. Build the Project

npm run build

7. Deploy Commands if Required

npm run deploy:commands

8. Start the Bot

npm start

Troubleshooting

Bot Does Not Start

Verify:

โ€ข .env exists โ€ข DISCORD_TOKEN is configured โ€ข DISCORD_CLIENT_ID is configured โ€ข DISCORD_GUILD_ID is configured when required โ€ข Dependencies are installed โ€ข The project builds successfully

Run:

npm run build

and review the resulting error output.

Slash Commands Are Missing

Verify that the commands have been deployed:

npm run deploy:commands

Also verify that the bot is installed in the correct Discord server with the required permissions.

Database Errors

Verify that:

data/

exists and that the application has permission to create or access the SQLite database.

Do not delete the database before creating a backup.

Module Is Not Working

Verify:

โ€ข The bot is online โ€ข The required Discord permissions are available โ€ข The corresponding configuration is correct โ€ข No startup or runtime errors are present in the logs


Technical Notes

Do not rename internal files, directories or modules unless you understand their references inside the project.

Changing project paths or database locations may require corresponding configuration changes.

Do not modify production database files manually.

Always create a backup before performing major updates or migrations.


Security

Never commit or publicly expose:

โ€ข Discord bot tokens โ€ข .env files containing secrets โ€ข Production databases โ€ข Private credentials โ€ข Server-specific sensitive configuration

Use environment variables for sensitive configuration.

If a Discord bot token is exposed, immediately revoke and regenerate the token through the Discord Developer Portal.


Support

When requesting support, provide as much of the following information as possible:

Bot Name:
Version:
Node.js Version:
Operating System:
Discord Server:
Command / Module:
Error Message:
Relevant Logs:
Description:
Steps to Reproduce:

Do not include:

โ€ข Discord bot tokens โ€ข Passwords โ€ข Private credentials โ€ข Other sensitive information


CB Studios

CB Community is part of the CB Studios ecosystem.

CB Studios develops FiveM and RedM resources, community tools, server infrastructure and development solutions.

Official Links

Store

https://pichirin-cb.tebex.io/

Documentation

https://docs.pichirincb.com

Discord

https://discord.gg/hsx6AvBg5s

GitHub

https://github.com/Pichirin-CB/cb-community-bot


โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•โ•šโ•โ•โ–ˆโ–ˆโ•”โ•โ•โ•โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ• โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ• โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•— โ•šโ•โ•โ•โ•โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘โ•šโ•โ•โ•โ•โ–ˆโ–ˆโ•‘ โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ• โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•‘ โ–ˆโ–ˆโ•‘ โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•‘โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•‘ โ•šโ•โ•โ•โ•โ•โ•โ•šโ•โ•โ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ•โ• โ•šโ•โ• โ•šโ•โ•โ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ• โ•šโ•โ• โ•šโ•โ•โ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ•โ•

Store -> https://pichirin-cb.tebex.io/

Documentation -> https://docs.pichirincb.com

Support Discord -> https://discord.gg/hsx6AvBg5s


End of documentation

About

Official CB Studios Discord community bot for moderation, community management, support tools, automation, and server utilities.

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages