sidequest_bot.bot#
Bot class: wiring for the API client, config cache, plugins, and slash-command errors.
Attributes#
Classes#
Slash-command bot. |
|
Command tree that tells users what went wrong (ephemerally) instead of failing silently. |
Functions#
|
Default intents plus the privileged ones the plugins need. |
|
Bot wired to the API described by |
Module Contents#
- class sidequest_bot.bot.SideQuestBot(*, api: sidequest_bot.api_client.SideQuestAPI, dev_guild_id: int | None = None)#
Bases:
discord.ext.commands.BotSlash-command bot.
apiandconfigsare shared by every plugin.- async close() None#
Close the API client along with the gateway connection.
- async on_ready() None#
Log the identity we connected as.
- async send_log(guild: discord.Guild, embed: discord.Embed) discord.Message | None#
Post
embedto the guild’s configured log channel. No-op if unset, missing, or not writable.
- async setup_hook() None#
Load every plugin module, then sync slash commands.
- api#
- configs#
- dev_guild_id = None#
- class sidequest_bot.bot.SideQuestTree#
Bases:
discord.app_commands.CommandTree[SideQuestBot]Command tree that tells users what went wrong (ephemerally) instead of failing silently.
- async on_error(interaction: discord.Interaction[SideQuestBot], error: discord.app_commands.AppCommandError, /) None#
Map known failures to a friendly message; log everything unexpected.
- sidequest_bot.bot.build_intents() discord.Intents#
Default intents plus the privileged ones the plugins need.
members: welcome, auto-role, member logs.message_content: automod filters and logging message text. Both must also be enabled for the application in the Discord Developer Portal.
- sidequest_bot.bot.create_bot(discord_settings: sidequest_common.settings.DiscordSettings, api_settings: sidequest_common.settings.APISettings) SideQuestBot#
Bot wired to the API described by
api_settings.
- sidequest_bot.bot.logger#