slidcord.command¶
Classes¶
Abstract base class to implement gateway commands (chatbot and ad-hoc) |
Module Contents¶
- class slidcord.command.ListGuilds(xmpp)[source]¶
Bases:
slidge.command.Command
Abstract base class to implement gateway commands (chatbot and ad-hoc)
- Parameters:
xmpp (slidge.core.gateway.BaseGateway)
- NAME = 'List your discord "servers"'[source]¶
Friendly name of the command, eg: “do something with stuff”
- HELP = 'List your discord servers and their channels'[source]¶
Long description of what the command does
- CATEGORY[source]¶
If used, the command will be under this top-level category. Use the same string for several commands to group them. This hierarchy only used for the adhoc interface, not the chat command interface.
- async run(session, ifrom, *args)[source]¶
Entry point of the command
- Parameters:
session – If triggered by a registered user, its slidge Session
ifrom (slixmpp.JID) – JID of the command-triggering entity
args – When triggered via chatbot type message, additional words after the CHAT_COMMAND string was passed
- Returns:
Either a TableResult, a Form, a Confirmation, a text, or None