Client reference ================ Any **ShellBot** needs a Client and other data model. To this end, core modules are required and listed below. .. autoclass:: shellbot.client.ShellBotClient :members: :exclude-members: on_ready, on_message, on_message_delete, on_reaction_add, on_guild_available, on_guild_unavailable, on_guild_update, on_guild_join, on_guild_remove, on_guild_role_create, on_guild_role_delete, on_guild_role_update, on_guild_channel_create, on_guild_channel_delete, on_member_join, on_member_remove, on_member_update, on_member_ban, on_member_unban, on_voice_state_update, on_exception, on_command_error Internal Events """"""""""""""" .. automethod:: shellbot.client.ShellBotClient.on_exception .. autocomethod:: shellbot.client.ShellBotClient.on_command_error Discord events """""""""""""" The following Discord events have been supplanted from their original behaviour. .. autocomethod:: shellbot.client.ShellBotClient.on_ready .. autocomethod:: shellbot.client.ShellBotClient.on_message .. autocomethod:: shellbot.client.ShellBotClient.on_message_delete .. autocomethod:: shellbot.client.ShellBotClient.on_reaction_add .. autocomethod:: shellbot.client.ShellBotClient.on_guild_available .. autocomethod:: shellbot.client.ShellBotClient.on_guild_unavailable .. autocomethod:: shellbot.client.ShellBotClient.on_guild_update .. autocomethod:: shellbot.client.ShellBotClient.on_guild_join .. autocomethod:: shellbot.client.ShellBotClient.on_guild_remove .. autocomethod:: shellbot.client.ShellBotClient.on_guild_role_create .. autocomethod:: shellbot.client.ShellBotClient.on_guild_role_delete .. autocomethod:: shellbot.client.ShellBotClient.on_guild_role_update .. autocomethod:: shellbot.client.ShellBotClient.on_guild_channel_create .. autocomethod:: shellbot.client.ShellBotClient.on_guild_channel_delete .. autocomethod:: shellbot.client.ShellBotClient.on_member_join .. autocomethod:: shellbot.client.ShellBotClient.on_member_remove .. autocomethod:: shellbot.client.ShellBotClient.on_member_ban .. autocomethod:: shellbot.client.ShellBotClient.on_member_unban .. autocomethod:: shellbot.client.ShellBotClient.on_member_update .. autocomethod:: shellbot.client.ShellBotClient.on_voice_state_update Administration ============== .. automodule:: shellbot.ui :members: Commands ======== :mod:`core` module """""""""""""""""" .. automodule:: shellbot.ext.core :members: :mod:`specs` module """"""""""""""""""" .. automodule:: shellbot.ext.specs :members: Cooldowns and errors """""""""""""""""""" .. automodule:: shellbot.ext.cooldown :members: .. automodule:: shellbot.ext.errors :members: Actions on arguments ==================== Action objects are used by an :class:`argparse.ArgumentParser` to represent the information needed to parse a single argument from one or more strings from the command line. This package provides an extension of :class:`argparse.Action`. Core classes """""""""""" .. automodule:: shellbot.ext.action :members: :special-members: .. automodule:: shellbot.ext.action_data :members: Enumerations """""""""""" This module provides actions for enumerations in :mod:`"shellbot.enums`. .. automodule:: shellbot.ext.action_enums :members: Mentions """""""" This module provides actions handling Discord mentions. .. automodule:: shellbot.ext.action_mentions :members: Mathematics """"""""""" This module provides actions handling numerical values and operations. .. automodule:: shellbot.ext.action_maths :members: Syntax """""" This module provides actions handling generic strings and syntax. .. automodule:: shellbot.ext.action_interpreter :members: .. automodule:: shellbot.ext.action_syntax :members: Time formats """""""""""" This module provides actions handling time objects or time formats following a specific syntax. .. automodule:: shellbot.ext.action_time :members: Parsing and context =================== This module provides classes describing positional or optional parser arguments and factory classes and methods to help in the construction of specific actions. .. automodule:: shellbot.ext.options :members: :special-members: :exclude-members: __init__, __str__, __repr__, __weakref__ :mod:`parser` module """""""""""""""""""" .. automodule:: shellbot.ext.parser :members: Servers ======= .. automodule:: shellbot.server.model :members: .. automodule:: shellbot.server.role :members: .. automodule:: shellbot.server.config :members: .. automodule:: shellbot.server.events :members: .. automodule:: shellbot.server.enums :members: .. automodule:: shellbot.server.job :members: .. automodule:: shellbot.server.record :members: .. automodule:: shellbot.server.static :members: Message and Interactions ======================== An event is defined by the following property: any event must be constructible from a Discord Server and a Discord Guild member. Private messages are not handled by the following modules and must be therefore specifically treated. Messages """""""" .. automodule:: shellbot.message :members: Context """"""" .. automodule:: shellbot.context :members: Interactive messages """""""""""""""""""" Messages may have an interactive user interface, such as pages navigation or votes. The following modules implement those functionalities. :mod:`analysis` module ---------------------- .. currentmodule:: shellbot.analysis .. autoclass:: AnalyzedView .. automethod:: register .. autocomethod:: initialize .. autocomethod:: edit .. comethod:: edit(embed) Overload :meth:`edit` for :class:`discord.Embed` objects. :param embed: The new embed to replace the message with. :type embed: :class:`discord.Embed` .. autocomethod:: delete .. autocomethod:: on_reaction_add .. autocomethod:: on_reaction_remove .. autocomethod:: on_timeout .. automethod:: check_reaction .. autocomethod:: add_reaction .. autocomethod:: remove_reaction .. autoclass:: BookView .. autoclass:: ImageView :mod:`interactive` module ------------------------- .. automodule:: shellbot.interactive :members: Enumerations ============ .. autoclass:: shellbot.enums.State .. autoclass:: shellbot.enums.Scope :undoc-members: .. autoclass:: shellbot.enums.WWW :members: Exceptions ========== Generic exceptions """""""""""""""""" .. autoclass:: shellbot.errors.InternalError .. autoclass:: shellbot.errors.OperationWarning Data consistency """""""""""""""" .. autoclass:: shellbot.errors.PrefixError .. autoclass:: shellbot.errors.NotFound Network errors """""""""""""" .. autoclass:: shellbot.errors.HTTPError Permissions errors """""""""""""""""" .. autoclass:: shellbot.errors.PAMError .. autoclass:: shellbot.errors.AuthFailure State errors """""""""""" .. autoclass:: shellbot.errors.DaemonError .. autoclass:: shellbot.errors.BadState Miscellaneous errors """""""""""""""""""" .. autoclass:: shellbot.errors.VoiceError Constant data ============= ShellBot constants are implemented in the :mod:`shellbot.const` module. :mod:`const` module """"""""""""""""""" .. automodule:: shellbot.const :members: Text formatting =============== .. automodule:: shellbot.formats.mixins :members: :mod:`page` module """""""""""""""""" .. currentmodule:: shellbot.formats.page .. autofunction:: paginate .. function:: paginate(message, *messages) Overload :func:`paginate` for :class:`"shellbot.formats.messages.Message`. .. function:: paginate(mapping, *mappings) Overload :func:`paginate` for :class:`dict`. .. function:: paginate(embed, *embeds) Overload :func:`paginate` for :class:`discord.Embed`. Messages formatting """"""""""""""""""" :mod:`messages` module ---------------------- .. automodule:: shellbot.formats.messages :members: :mod:`embeds` module -------------------- .. automodule:: shellbot.formats.embeds :members: Miscellaneous ============= :mod:`mixins` module """""""""""""""""""" .. automodule:: shellbot.mixins :members: :mod:`loggers` module """"""""""""""""""""" .. automodule:: shellbot.loggers :members: :mod:`requests` module """""""""""""""""""""" .. automodule:: shellbot.requests :members: