> For the complete documentation index, see [llms.txt](https://docs.guildabot.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.guildabot.com/guilda-bot-knowledge-base/customer-guides/installation-guide/guilda-bot-free-version.md).

# Guilda Bot (Free Version)

## Guilda Bot (Free Version)

A free and open-source Discord bot built with Oceanic.js and Prisma.

### Features

{% columns %}
{% column %}

* Bot Customizer
* Advanced Logging System
* Welcome Module
* Application Modules
* Self Role Module
  {% endcolumn %}

{% column %}

* Role Request Module
* Birthdays Module
* Suggestions Module
* Giveaway Module
* Polls Module
  {% endcolumn %}
  {% endcolumns %}

### Prerequisites

* Node.js v16.x
* MySQL database
* Docker (optional, for containerized deployment)

### Traditional Setup

{% stepper %}
{% step %}

### **Clone the repository**

```
git clone https://github.com/yourusername/slothybot-free.git
cd slothybot-free
```

{% endstep %}

{% step %}

### &#x20;**Install dependencies**

```
npm install
```

{% endstep %}

{% step %}

### **Create a `.env` file in the root directory**

```
TOKEN="your-discord-bot-token"
ACTIVITY_NAME="Testing"
ACTIVITY_TYPE=0
PRODUCTION=0
BOT_DATABASE_URL="mysql://username:password@localhost:3306/your_database"
TEST_GUILD_ID=""
```

{% endstep %}

{% step %}

### **Set up the database**

```
npm run ready
```

{% endstep %}

{% step %}

### **Start the bot**

```
npm start
```

```
npm run build
npm run start:prod
```

{% endstep %}
{% endstepper %}

### Docker Setup

{% stepper %}
{% step %}

### **Clone the repository and navigate into it**

```
git clone https://github.com/yourusername/slothybot-free.git
cd slothybot-free
```

{% endstep %}

{% step %}

### **Create a `.env` file as described above**

```
npm install
```

{% endstep %}

{% step %}

### **Build and run using Docker**

```
docker build -t slothybot .
docker run -d --env-file .env slothybot
```

{% endstep %}
{% endstepper %}

### Environment Variables

* TOKEN: Your Discord bot token
* ACTIVITY\_NAME: Bot's activity status text
* ACTIVITY\_TYPE: Activity type (0 = Playing, 1 = Streaming, etc.)
* PRODUCTION: Production mode flag (0 = development, 1 = production)
* BOT\_DATABASE\_URL: MySQL database connection URL
* TEST\_GUILD\_ID: Discord server ID for testing commands in development mode

### Important Notes

* This project uses older dependencies and is specifically tested with Node.js v16.x
* Required system dependencies for image processing:
  * build-base
  * g++
  * cairo-dev
  * jpeg-dev
  * pango-dev
  * imagemagick
  * giflib-dev
  * librsvg-dev

### Database Migrations

To update the database schema:

```
npm run prisma-migrate
```

To regenerate the Prisma client:

```
npm run prisma-generate
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.guildabot.com/guilda-bot-knowledge-base/customer-guides/installation-guide/guilda-bot-free-version.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
