core module¶
-
class
shellbot.plugins.core.setup.Core(*args, **kwargs)¶ Implement the Core plugin. This plugin requires an update when the Discord Client is ready.
-
coroutine
cat(ctx, *, target)¶ Implement the
catcommand.Parameters:
-
coroutine
chmod(ctx, *, px=None, nx=None)¶ Implement the
chmodcommand.Parameters:
-
coroutine
config(ctx, **kwargs)¶ Implement the
configcommand.Parameters: - ctx (
Context) – The command context. - L (bool [optional]) – Require mentions.
- K (bool [optional]) – Keep the voice connection.
- reset (bool [optional]) – Reset the configuration.
- default (bool [optional]) – Display default configuration.
- prefix (str [optional]) – New prefix.
- verbose (int [optional]) – Logging verbosity.
- ctx (
-
coroutine
config_export(ctx, **kwargs)¶ Implement the
config_exportcommand.Parameters: ctx ( Context) – The command context.Raise: NotFound– No configuration found.
-
coroutine
config_import(ctx, *, keep=False)¶ Implement the
config_importcommand.Parameters: Raise: NotFound– Nothing to import.Raise: BadArgument– Cannot import.
-
coroutine
debug_command(ctx)¶ Implement the
debugcommand.Parameters: ctx ( Context) – The command context.
-
coroutine
ignoreme(ctx)¶ Implement the
ignorecommand.Parameters: ctx ( Context) – The command context.
-
coroutine
log(ctx, *, stderr=None, dates=None, **kwargs)¶ Implement the
logcommand.Parameters: Raise: NotFound– Channel not found.Raise: CommandError– Not in stderr.
-
coroutine
sleep(ctx, *, time=None, delay=None, dt=None, cancel=False)¶ Implement the
sleepcommand.Parameters: - ctx (
Context) – The command context. - time (
TimeData) – Optional time descriptor. - delay (
TimeExpression) – Optional sleeping task delay. - dt (
TimeExpression) – Optional sleeping task duration. - cancel (bool [optional]) – Cancel the sleeping task.
- ctx (
-
coroutine
test(ctx)¶ Implement the
testcommand.
-
coroutine
Helpers¶
-
class
shellbot.plugins.core.lib.helpers.UI¶ Namespace for user interfaces.
-
class
chmod(context, resolver, messenger)¶ A helper context for the chmod command. Concerned context data are given by the context
dataproperty.Parameters: -
__init__(context, resolver, messenger)¶ Initialize self. See help(type(self)) for accurate signature.
-
on_server()¶ Return a
py314.theory.TheoreticSetof plugins currently enabled on the server.
-
__enter__()¶ Return self and open a context.
-
__exit__(exc_type, exc_val, exc_tb)¶ If an exception is raised while in the context, a rollback is done via the Memento in
Server. Otherwise, save the new server components.
-
parse(names)¶ For every name in names, search for a component according to a set of predefined rules. Each name is either a normal component name which contains no special prefix or suffix, or an extended name whose prefix or suffix follow the forgoing mentioned rules.
A component is stored inside a dictionary, whose structure is given by arrows scope → component, where scope is the interpreted prefix and component is a
Component.The search is performed by the API resolver. Exceptions are raised if a component does not exist, is essential or is disabled.
Parameters: names (list) – Extended components names. See also
See also
-
update(state, scope, components)¶ Change the server’s state components on the same given scope via
update_component().Parameters:
-
__weakref__¶ list of weak references to the object (if defined)
-
coroutine
notify(state, scope, components)¶ Notify the channel context that modifications were applied.
Parameters:
-
-
__weakref__¶ list of weak references to the object (if defined)
-
class