Configuration¶
-
class
lifesaver.bot.BotConfig(data: dict)[source]¶ A bot config file. The only required value is the
tokenfield, which is required to connect to Discord’s gateway and use the REST API.-
bot_class= None¶ The custom bot class to instantiate when using the CLI module.
It is formatted as an import path and class separated by a colon, like:
coolbot.bot:CustomBotClass
-
cog_config_path= './config'¶ The path for cog-specific configuration files.
-
command_prefix= '!'¶ The command prefix to use. Can be a string or a list of strings.
-
command_prefix_include_mentions= True¶ Determines whether mentions work as a prefix.
-
config_class= None¶ The custom config class to use when using the CLI.
-
description= 'A Discord bot.'¶ The bot’s description. Shown in the help command.
-
dm_help= None¶ A tribool describing how the bot should decide to DM help messages. See
discord.ext.commands.DefaultHelpCommand.dm_help.
-
emojis= {'generic': {'no': '❌', 'ok': '👌', 'yes': '✅'}}¶ The global bot emoji table.
-
extensions_path= './exts'¶ The path to load extensions from.
-
hot_reload= False¶ Enables the hot reloader.
-
ignore_bots= True¶ Ignores bots when processing commands.
-
logging= None¶ The logging config to use when using the CLI. See
BotLoggingConfig.
-
postgres= None¶ PostgreSQL access credentials.
-
token= None¶ The token of the bot.
-
-
class
lifesaver.bot.config.BotLoggingConfig(data: dict)[source]¶ The subconfig for tweaking logging options.
-
file= 'bot.log'¶ The file to output to.
-
format= '[{asctime}] [{levelname}] {name}: {message}'¶ The logging format.
-
level= 'INFO'¶ The logging level to use.
-
time_format= '%Y-%m-%d %H:%M:%S'¶ The time logging format.
-