Config Files

The config file for the bot is one of the few required changes from default Discord.py, meaning that keeping your config file correct and up-to-date pretty important.

Bot Config File

class BotConfig
token: str

The token that the bot should run with.

owners: list

A list of the IDs for the owners of the bot. People in this list will bypass all command check failures, and will receive DMs from the bot when it hits an error if BotConfig.dm_uncaught_errors is enabled.

dm_uncaught_errors: bool

Whether or not the bot should DM the owners a traceback when it hits an unhandled error.

user_agent: str

A simple constant that you can access with voxelbotutils.Bot.user_agent.

default_prefix: str, list

The prefix that the bot should use by default. Can be either a string or a list. The bot will always respond to its user and role mention.

Changed in version 0.3.1: Leaving an empty list or string will mean that the bot only responds to pings, and only from people set as owners. This is intended for slash-command only bots. If you want a prefix-run bot without specifying a prefix, using a space as a prefix will do this for you.

support_guild_id: int

The ID of your support guild. Will be used in voxelbotutils.Bot.fetch_support_guild().

bot_support_role_id: int

The ID of your bot support role. Will be used in voxelbotutils.checks.is_bot_support().

guild_settings_prefix_column: str

The column of your prefix in the guild_settings table. You don’t need to change this from prefix unless you’re running multiple bots from the same directory.

cached_messages: int

The number of messages to keep cached in the bot.

ephemeral_error_messages: bool

New in version 0.3.1.

Whether or not error messages triggered by slash commands should be ephemeral or not.

owners_ignore_check_failures: bool

New in version 0.4.1.

Whether or not check failures are ignored for owners.

class event_webhook

A simple webhook that recieves event pings.

event_webhook_url: str

A Discord webhook URL to send event notifications to.

class events
guild_join: bool
guild_remove: bool
shard_connect: bool
shard_disconnect: bool
shard_ready: bool
bot_ready: bool
unhandled_error: bool
class intents

The intents that you want enabled on the bot.

guilds: bool
members: bool
bans: bool
emojis: bool
integrations: bool
webhooks: bool
invites: bool
voice_states: bool
presences: bool
guild_messages: bool
dm_messages: bool
guild_reactions: bool
dm_reactions: bool
guild_typing: bool
dm_typing: bool
class bot_listing_api_keys

API keys that the bot uses internally to keep the bot listings up-to-date.

topgg_token
discordbotlist_token
class bot_info
enabled: bool

Whether or not the info command is enabled. It’s highly recommended that this remains enabled.

include_stats: bool

Whether or not to include the general bot stats embed with the info command.

content: str

The content that should be output in the info command. This gets put into an embed, so standard markdown is allowed. This string is also passed into .format with your bot instance and the links provided below.

The links that should be added as buttons onto your info command.

class oauth

Oauth data used to build the bot’s invite link.

enabled: bool

Whether or not the invite command is enabled.

response_type: str

The response type that the authorize page gives you. Unless you’re doing things with oauth, youc an leave this alone.

redirect_uri: str

Where the user id redirected to when they authorize your bot.

client_id: str

The client ID for your application.

scope: str

A space-seperated list of scopes that your invite command will use.

permissions: list

A list of the permissions that the invite command should use.

class database

The configuration for your Postgres connection.

type: str

The type of database driver that should be connected. Valid types are postgres (default, requires asyncpg to be installed), sqlite (requires aiosqlite to be installed), and mysql (requires aiomysql to be installed).

enabled: bool

Whether or not to connect to the database on startup.

user: str

The user that you want to connect with,

password: str

The password of that user.

database: str

The database that you want to connect to.

host: str

The host IP/URL that you want to connect to.

port: int

The port that your Postgres instance is running on.

class redis

The configuration for you Redis connection.

enabled: bool

Whether or not to connect to redis on startup.

host: str

The host IP/URL that you want to connect to.

port: int

The port that your Redis instance is running on.

db: int

The database that you want to connect to.

class shard_manager
enabled: bool

Whether or not the shard manager for this instance is enabled.

host: str

The host IP that the manager is running on.

port: int

The host port that the manager is running on.

class embed

Details for auto-embedding all bot responses.

enabled: bool

Whether or not you want to automatically embed bot responses.

content: str

Additional content to be sent with the bot response.

colour: int

The colour of the embed to be sent. If the value given is 0, then the colour will be random.

footer: list

A list of footer objects to be added to the bot. These should contain text and amount attributes. A footer will be picked randomly from the list.

class author

The author that will get added to the embed.

enabled: bool

Whether or not you want to add an author to your embed.

name: str

The name of the author field.

url: str

The URL that the author field should point to.

class presence

The presence that the bot should use when online.

activity_type: str

The type of activity that the bot should be using.

text: str

The text given to the activity.

status: str

The status of the bot while online.

include_shard_id: bool

Whether or not the shard ID of the bot should be included in its presence. Only applies after you identify with more than one shard.

class streaming

A set of information that lets you automatically update the bot’s presence when a given user starts streaming on Twitch.tv. You can get client information from here.

twitch_usernames: list

A list of usernames that you want to check for.

twitch_client_id: str

Your Twitch client ID.

twitch_client_secret: str

Your Twitch client secret.

class upgrade_chat

A set of information that lets you check for purchases made with Upgrade.Chat. You can get client information from here.

client_id: str

Your Upgrade.Chat client ID.

client_secret: str

Your Upgrade.Chat client ID.

class statsd

Your Datadog stats information.

host: str

The host that you want to post information to.

port: int

The port that you want to connect to.

class constant_tags

The tags that you want to send with each post. Most helpful is the bot name.

service: str

An identifier for this set of stats - required for the information posting to be enabled.

Website Config File

class WebsiteConfig
website_base_url: str

The base URL for the website.

login_url: str

The endpoint on your website that redirects the user to a Discord login page.

routes: list

A list of route files to load into the bot.

oauth_scopes: list

A list of Oauth scopes that the Discord login should come loaded in with.

class discord_bot_configs

A list of key: config pairs that allow the website to interact with bot routes via request.app[key].

bot
class oauth

The information that should be used to process the user’s login.

client_id: str

The client ID for the user login.

client_secret: str

The client secret for the user login.

class database

The configuration for your Postgres connection.

enabled: bool

Whether or not to connect to the database on startup.

user: str

The user that you want to connect with,

password: str

The password of that user.

database: str

The database that you want to connect to.

host: str

The host IP/URL that you want to connect to.

port: int

The port that your Postgres instance is running on.

class redis

The configuration for you Redis connection.

enabled: bool

Whether or not to connect to redis on startup.

host: str

The host IP/URL that you want to connect to.

port: int

The port that your Redis instance is running on.

db: int

The database that you want to connect to.