slidgram.command
#
Module Contents#
Classes#
Abstract base class to implement gateway commands (chatbot and ad-hoc) |
|
Abstract base class to implement gateway commands (chatbot and ad-hoc) |
|
Abstract base class to implement gateway commands (chatbot and ad-hoc) |
|
Abstract base class to implement gateway commands (chatbot and ad-hoc) |
Functions#
- class slidgram.command.ListSessions(xmpp)[source]#
Bases:
SessionCommandMixin
,slidge.command.Command
Abstract base class to implement gateway commands (chatbot and ad-hoc)
- Parameters:
xmpp (slidge.core.gateway.BaseGateway) –
- class slidgram.command.TerminateSession(xmpp)[source]#
Bases:
SessionCommandMixin
,slidge.command.Command
Abstract base class to implement gateway commands (chatbot and ad-hoc)
- Parameters:
xmpp (slidge.core.gateway.BaseGateway) –
- async step2(form_values, session, _ifrom, tg_sessions)[source]#
- Parameters:
tg_sessions (list[aiotdlib.api.Session]) –
- async static finish(session, _ifrom, session_i)[source]#
- Parameters:
session (slidgram.session.Session) –
session_i (int) –
- class slidgram.command.JoinPublicChat(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 – If triggered by a registered user, its slidge Session
ifrom – 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
- async static finish(form_values, session, _ifrom)[source]#
- Parameters:
form_values (dict) –
session (slidgram.session.Session) –
- class slidgram.command.SearchPublicChats(xmpp)[source]#
Bases:
slidge.command.Command
Abstract base class to implement gateway commands (chatbot and ad-hoc)
- Parameters:
xmpp (slidge.core.gateway.BaseGateway) –
- HELP = 'Searches public chats by looking for specified query in their username and title. Currently,...'[source]#
- async run(_session, _ifrom, *_args)[source]#
Entry point of the command
- Parameters:
session – If triggered by a registered user, its slidge Session
ifrom – 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
- async step2(form_values, session, _ifrom)[source]#
- Parameters:
form_values (dict) –
session (slidgram.session.Session) –
- async static join(form_values, session, _ifrom)[source]#
- Parameters:
form_values (dict) –
session (slidgram.session.Session) –