An advanced Discord bot using Markov chains for message generation.
-
Clone the repository:
git clone https://github.com/l1v0n1/neurobalbes-discord.git cd neurobalbes-discord
-
Install dependencies:
npm install --omit=optional
-
For voice functionality (optional):
npm run voice:install
This command installs the required dependencies for voice features:
@discordjs/voice
,@discordjs/opus
, andffmpeg-static
.If you encounter errors, ensure you have Python and a C++ build toolchain installed (see prerequisites below). For troubleshooting, see the "Voice Features Troubleshooting" section at the end of this README.
-
Create a config.json file:
{ "token": "YOUR_BOT_TOKEN_HERE", "bot_description": "Neurobalbes | /help", "prefix": "/", "clientId": "YOUR_CLIENT_ID_HERE", "inviteLink": "YOUR_BOT_INVITE_LINK", "serverLink": "YOUR_SUPPORT_SERVER_LINK", "adminId": "YOUR_ADMIN_ID", "site": "https://your-bot-website.com", "raw_limit": 2000, "shardCount": "auto", "shardArgs": ["--max-old-space-size=2048"] }
-
Verify your installation:
npm run check-install
-
Start the bot:
npm start
For development:
npm run dev
You can also use the provided deployment script which will guide you through the setup process:
chmod +x deploy.sh
./deploy.sh
The script will:
- Check if your configuration is valid
- Install dependencies
- Install voice dependencies if requested
- Verify the installation
- Start the bot with your preferred method (normal or PM2)
ℹ️ The image is not supplied by the original developer. If you encounter any issues with it, address them to https://github.com/kuper-dot/neurobalbes-discord.
The docker image does not support voice functionality (yet)
Use the provided docker compose file to deploy the bot using the docker GUI of your choice
⚠️ Don't forget to change the environmental variables!
version: '3.8'
services:
neurobalbes-bot:
image: kuperdot/neurobalbes-discord:latest
container_name: neurobalbes-bot
volumes:
- balbes-data:/app/data
environment:
BOT_TOKEN: your-bot-token
PREFIX: /
BOT_DESCRIPTION: 'Neurobalbes | Type /help for commands'
CLIENT_ID: your-bot-client-id
RAW_LIMIT: 2000
INVITE_LINK: your-invite-link
SERVER_LINK: your-server-link
ADMIN_ID: 123456789 # Replace with your discord user ID
SITE: https://www.youtube.com/watch?v=dQw4w9WgXcQ # Replace with your site URL
command: ["npm", "start"]
volumes:
balbes-data:
If you don't use the GUI you can:
-
Download docker-compose.yml
wget https://raw.githubusercontent.com/l1v0n1/neurobalbes-discord/main/docker-compose.yml
-
Modify the file to include proper varibles
-
Run:
docker-compose up -d
-
Clone the repository:
git clone https://github.com/l1v0n1/neurobalbes-discord.git cd neurobalbes-discord
-
Build the image using provided dockerfile
docker build -t neurobalbes-discord .
-
Use the following command to deploy the image
docker run -d \ --name neurobalbes-bot \ -v balbes-data:/app/data \ -e BOT_TOKEN=your-bot-token \ -e PREFIX=/ \ -e BOT_DESCRIPTION='Neurobalbes | Type /help for commands' \ -e CLIENT_ID=your-bot-client-id \ -e RAW_LIMIT=2000 \ -e INVITE_LINK=your-invite-link \ -e SERVER_LINK=your-server-link \ -e ADMIN_ID=123456789 \ -e SITE=your-website \ neurobalbes-discord
- /help - Shows available commands
- /gen - Generates a message using Markov chains
- /gendem - Generates a message with different settings
- /continue - Continues a message thread
- /voice - Voice channel interactions (requires voice dependencies)
- /setting - Configure bot settings
- /language - Change bot language
- /delete - Delete learned data
- /stats - View bot statistics
- /info - Get bot information
- /shards - View shard information
- Node.js 16.9.0 or higher
MIT
Neurobalbes is an advanced Discord bot that uses Markov chains to generate messages based on server chat history. It learns from conversations and can generate contextually relevant responses.
- Message learning and generation using Markov chains
- Multi-server support with sharding
- Customizable response frequency
- Support for images and attachments
- Multiple language support
- Efficient database management
- Auto-recovery from disconnections
- Node.js v16.9.0 or higher
- SQLite3
- Discord Bot Token
Before installing dependencies, make sure you have the following prerequisites installed for your operating system:
- Install Node.js (v16.9.0 or higher)
- Install Visual Studio Build Tools
- During installation, select "Desktop development with C++"
- This is required for compiling native modules
- Install Node.js (v16.9.0 or higher)
- Install Xcode Command Line Tools:
xcode-select --install
- Install Opus (required for voice support):
brew install opus
- Install Node.js (v16.9.0 or higher)
- Install required build tools and libraries:
sudo apt-get update sudo apt-get install build-essential python3 libtool-bin sudo apt-get install libopus-dev
After installing the prerequisites, run:
npm install
- Clone the repository:
git clone https://github.com/l1v0n1/neurobalbes-discord.git
cd neurobalbes-discord
- Install dependencies:
npm install
- Configure the bot:
- Rename
config.example.json
toconfig.json
- Add your Discord bot token and other settings
- Start the bot:
# Development mode
npm run dev
# Production mode
npm start
Edit config.json
to customize:
- Bot token
- Bot description
- Command prefix
- Message limits
- Admin settings
/help
- Show available commands/language
- Change bot language- More commands available in the commands directory
neurobalbes-discord/
├── src/
│ ├── core/ # Core bot functionality
│ ├── database/ # Database operations
│ ├── utils/ # Utility functions
│ └── commands/ # Bot commands
├── assets/ # Static assets
├── config.json # Bot configuration
└── package.json # Project dependencies
Neurobalbes - это продвинутый Discord бот, использующий цепи Маркова для генерации сообщений на основе истории чата сервера. Он учится на основе разговоров и может генерировать контекстуально релевантные ответы.
- Обучение и генерация сообщений с использованием цепей Маркова
- Поддержка множества серверов с шардингом
- Настраиваемая частота ответов
- Поддержка изображений и вложений
- Поддержка нескольких языков
- Эффективное управление базой данных
- Автоматическое восстановление после отключений
- Node.js версии 16.9.0 или выше
- SQLite3
- Токен Discord бота
Перед установкой зависимостей убедитесь, что у вас установлены следующие компоненты для вашей операционной системы:
- Установите Node.js (версии 16.9.0 или выше)
- Установите Visual Studio Build Tools
- Во время установки выберите "Разработка классических приложений на C++"
- Это необходимо для компиляции нативных модулей
- Установите Node.js (версии 16.9.0 или выше)
- Установите инструменты командной строки Xcode:
xcode-select --install
- Установите Opus (необходим для поддержки голоса):
brew install opus
- Установите Node.js (версии 16.9.0 или выше)
- Установите необходимые инструменты для сборки и библиотеки:
sudo apt-get update sudo apt-get install build-essential python3 libtool-bin sudo apt-get install libopus-dev
После установки предварительных требований выполните:
npm install
- Клонируйте репозиторий:
git clone https://github.com/l1v0n1/neurobalbes-discord.git
cd neurobalbes-discord
- Установите зависимости:
npm install
- Настройте бота:
- Переименуйте
config.example.json
вconfig.json
- Добавьте токен вашего Discord бота и другие настройки
- Запустите бота:
# Режим разработки
npm run dev
# Продакшн режим
npm start
Отредактируйте config.json
для настройки:
- Токена бота
- Описания бота
- Префикса команд
- Лимитов сообщений
- Настроек администратора
/help
- Показать доступные команды/language
- Изменить язык бота- Дополнительные команды доступны в директории commands
neurobalbes-discord/
├── src/
│ ├── core/ # Основной функционал бота
│ ├── database/ # Операции с базой данных
│ ├── utils/ # Вспомогательные функции
│ └── commands/ # Команды бота
├── assets/ # Статические ресурсы
├── config.json # Конфигурация бота
└── package.json # Зависимости проекта