pibot package
Subpackages
Submodules
pibot.bot module
The custom bot class for PiBot.
pibot.database module
Custom database class for the application.
- class pibot.database.Database(client: MongoClient)
Bases:
objectCustom database class for the application.
- async check_if_guild_exists_else_initialize(guild: Guild)
Check if a guild exists in the database. If not, add it.
- Parameters:
guild – The guild to check.
- async get_prefix(message: Message)
Get the prefix for a guild.
- Parameters:
_ – The bot.
message – The message including guild info to get the prefix for.
- Returns:
The prefix.
- async get_setting(guild: Guild, setting: str)
Get a setting for a guild.
- Parameters:
guild – The guild to get the setting for.
setting – The key for the setting to get.
- Returns:
The value of the setting.
- async initialize_guild(guild: Guild)
Initialize a guild in the database.
- Parameters:
guild – The guild to initialize.
pibot.errors module
Custom errors for the bot.
- exception pibot.errors.BotNotConnectedToVoice
Bases:
AppCommandErrorRaised when the bot is not connected to a voice channel.
- exception pibot.errors.BotNotPlayingAudio
Bases:
AppCommandErrorRaised when the bot is not playing anything.
- exception pibot.errors.UserNotConnectedToVoice
Bases:
AppCommandErrorRaised when a user is not connected to a voice channel.
Module contents
PiBot Discord Bot Package.