Installation
This guide covers the installation and setup of Xeno Bot, including dependency installation and environment preparation. Follow the steps below to get started.
Prerequisites¶
Before installing Xeno Bot, confirm that your system meets the following requirements:
System Requirements¶
- Operating System: Windows, macOS, or Linux
- Node.js: Version 18 or later
!!! warning Ensure you have Node.js installed. Older versions may not support the latestdiscord.jsfeatures.
Download Node.js here. - npm: Comes bundled with Node.js
- Git: Required for cloning the repository.
Download Git here.
Optional:¶
- SQLite or Postgres: SQLite is used by default for smaller setups. For larger deployments, install PostgreSQL.
Step 1: Clone the Repository¶
Open a terminal and run the following:
Note
Cloning the repository ensures you’re working with the latest stable Xeno Bot version. Keep your local copy updated by pulling new changes as needed.
Step 2: Install Dependencies¶
Install the required dependencies by running:
This will set up everything listed in the package.json file.
Tip
If you encounter errors during installation, make sure your Node.js version meets the requirements and your internet connection is stable. Use npm install --legacy-peer-deps if dependency conflicts occur.
Step 3: Set Up the Environment¶
Create a .env File¶
Copy the template environment file:
Edit the .env file to include your bot token and other essential values. Example:
TOKEN=your-bot-token
CLIENT_ID=your-client-id
GUILD_ID=123456789012345678 # Optional for development
LOG_LEVEL=info
Warning
Never share your .env file or commit it to version control! Use .gitignore to ensure it stays local.
Step 4: Verify Configuration Files¶
Xeno Bot requires configuration files in config/. Verify that the following files exist: - config/config.json: General bot settings (e.g., prefix, owner). Example:
config/bot.public.json: Public bot metadata. - config/bot.dev.json: Development-specific settings. Note
For detailed configuration steps, see the Configuration Guide.
Step 5: Run the Bot¶
Start the bot to ensure everything works as expected.
Development Mode¶
Run the bot locally for development:
Production Mode¶
Run the bot for public hosting:
Note
Use LOG_LEVEL=debug in the .env file during development for detailed logging.
Troubleshooting Installation Issues¶
Here are some common issues and solutions if you encounter problems during installation:
Issue: "Command Not Found"¶
Solution: Make sure npm and git are added to your system’s PATH. Reinstall from Node.js or Git as needed.
Issue: Dependency Errors¶
Solution: Use the following commands:
Issue: Missing .env Variables¶
Solution: Double-check that the .env file exists and is properly configured. Refer to the Configuration Guide for details.
Tip
For more issues, visit the Deployment Guide or join our community for assistance.
Optional Step: Testing with Docker¶
Xeno Bot also supports Docker for simplified setup in containerized environments.
Docker Quick Start¶
- Build the Docker image:
- Run the container:
Docker-Compose Example¶
Alternatively, use docker-compose for easier management:
version: "3.9"
services:
xeno-bot:
build:
context: .
env_file:
- .env
ports:
- "3000:3000"
restart: unless-stopped
Tip
For more advanced deployments, see the Deployment Guide.
Example Commands¶
Here are useful commands you may need during installation or development:
Start the Bot¶
Run with Debug Logs¶
Deploy Slash Commands¶
Helpful Links¶
With this guide, Xeno Bot should now be installed and ready for development or deployment. If you encounter any issues, refer to the troubleshooting section or reach out to the community. ```
Features of this Page:¶
- Refined Structure: Includes prerequisites, step-by-step instructions, and troubleshooting tips.
- Use of MkDocs Material Notes: Added
!!! note,!!! tip, and!!! warningto highlight critical details. - Links to Relevant Pages: Links to the Configuration and Deployment guides for seamless navigation.
- Docker Option: An optional testing section for users familiar with Docker.
- Common Commands: Added a quick reference for useful commands.
This installation page ensures everything is explained clearly for both novice and experienced users. Let me know if you require further changes or additions!