matridge.command¶
Classes¶
Abstract base class to implement gateway commands (chatbot and ad-hoc) |
|
Abstract base class to implement gateway commands (chatbot and ad-hoc) |
Module Contents¶
- class matridge.command.ListSpaces(xmpp)[source]¶
Bases:
slidge.command.Command
Abstract base class to implement gateway commands (chatbot and ad-hoc)
- Parameters:
xmpp (slidge.core.gateway.BaseGateway)
- async run(session, _ifrom, *args)[source]¶
Entry point of the command
- Parameters:
session (matridge.session.Session) – If triggered by a registered user, its slidge Session
ifrom – JID of the command-triggering entity
args (str) – 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
- Return type:
- static finish(form_values, session, _ifrom, rooms)[source]¶
- Async:
- Parameters:
form_values (slidge.command.base.FormValues)
session (matridge.session.Session)
rooms (list[nio.MatrixRoom])
- class matridge.command.ManageTrust(xmpp)[source]¶
Bases:
slidge.command.Command
Abstract base class to implement gateway commands (chatbot and ad-hoc)
- Parameters:
xmpp (slidge.core.gateway.BaseGateway)
- async run(session, _ifrom, *args)[source]¶
Entry point of the command
- Parameters:
session (matridge.session.Session) – If triggered by a registered user, its slidge Session
ifrom – JID of the command-triggering entity
args (str) – 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
- Return type:
Union[slidge.command.Form, str]
- async step2(form_values, session, _ifrom, devices)[source]¶
- Parameters:
form_values (slidge.command.base.FormValues)
session (matridge.session.Session)