โโโโโโโ โโโโโโโโ โโโโโโ โโโโโโโ โโโโ โโโโโโโโโโโโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโ
โโโโโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ
โโโโโโโโโโโโโโ โโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโ
โโโ โโโโโโโโโโโโโโ โโโโโโโโโโโโโโ โโโ โโโโโโโโโโโ
โโโ โโโโโโโโโโโโโโ โโโโโโโโโโ โโโ โโโโโโโโโโโ
Official CB Studios Discord Community Bot
Version: 1.0.0
Author: CB Studios
Type: Discord Community Bot
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.
โข Server moderation utilities
โข Permission-aware administrative commands
โข Moderation and management tools
โข Ticket creation and management
โข Ticket claiming
โข Ticket closing and reopening
โข Transcript workflows
โข Staff support utilities
โข Automated member welcome messages
โข Configurable welcome behavior
โข Automatic role assignment
โข Interactive role selection
โข Role management utilities
โข Protected-role handling
โข Temporary voice channel creation
โข Automatic channel management
โข Cleanup of inactive temporary channels
โข Automated Discord workflows
โข Community announcements
โข Discord event handling
โข Server automation tools
โข Bot status information
โข Runtime information
โข Uptime information
โข Health and diagnostic utilities
โข Private developer commands
โข Module information
โข Health checks
โข Operational diagnostics
โข SQLite database
โข Automatic database migrations
โข Persistent community configuration
โข Local data storage
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.
Clone or download the CB Community repository.
git clone https://github.com/Pichirin-CB/cb-community-bot.gitOpen a terminal inside the project directory and run:
npm installCreate 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.
Deploy the slash commands:
npm run deploy:commandsOn Windows, you can also use:
deploy-commands.bat
npm run buildnpm startConfiguration is primarily handled through environment variables.
The main configuration file is:
.env
Use .env.example as the reference configuration.
DISCORD_TOKEN=
DISCORD_CLIENT_ID=
DISCORD_GUILD_ID=NODE_ENV=development
LOG_LEVEL=info
BOT_PRESENCE=Con la comunidad ๐ฎDATABASE_PATH=./data/cb_community.sqliteNever commit .env files containing private credentials.
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:migrateIf 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.
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.
Run the bot in development mode:
npm run devDevelopment mode is intended for local development and testing.
Compile the TypeScript project:
npm run buildThe compiled application is generated in the project's distribution directory.
Before deploying changes, run:
npm run build
npm run lint
npm run testAll available checks should complete successfully before deploying a modified production build.
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.
To update an existing installation:
Stop the currently running CB Community process.
Create a backup of:
data/cb_community.sqlite
Replace the project files with the new version.
npm installnpm run db:migratenpm run buildnpm run deploy:commandsnpm startVerify:
โข .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 buildand review the resulting error output.
Verify that the commands have been deployed:
npm run deploy:commandsAlso verify that the bot is installed in the correct Discord server with the required permissions.
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.
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
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.
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.
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 Community is part of the CB Studios ecosystem.
CB Studios develops FiveM and RedM resources, community tools, server infrastructure and development solutions.
Store
Documentation
Discord
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