Files
revanced-bots/bots/discord/docs/1_configuration.md
2024-07-08 19:43:03 +07:00

1.5 KiB

⚙️ Configuration

This page tells you how to configure the bot.

📄 JSON config

See config.ts.


config.owners

User IDs of the owners of the bot. Only add owners when needed.

config.guilds

Servers the bot is allowed to be and register commands in.

config.logLevel

The level of logs to print to console. If the level is more important or equally important to set level, it will be forwarded to the console.

The possible levels (sorted by their importance descendingly) are:

  • none
  • fatal
  • error
  • warn
  • info
  • log
  • debug

config.api.url

WebSocket URL to connect to (including port). Soon auto-discovery will be implemented.

config.api.disconnectLimit

Amount of times to allow disconnecting before exiting with code 1.

config.messageScan

Please see the next page.

config.moderation

TBD.

config.rolePresets

TBD.

🟰 Environment variables

See .env.example.
You can set environment variables in your shell or use a .env file which Bun will automatically load.


DISCORD_TOKEN

The Discord bot token.

DATABASE_URL

The database URL, since we're using SQLite, we'll be using the file protocol.
Example values are: file:./revanced.db, file:./db.sqlite, file:./discord_bot.sqlite

⏭️ What's next

The next page will tell you how to configure auto-responses.

Continue: 🗣️ Adding auto-responses