slidge_whatsapp.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) |
- class slidge_whatsapp.command.Logout(xmpp)[source]#
Bases:
slidge.command.Command
Abstract base class to implement gateway commands (chatbot and ad-hoc)
- Parameters:
xmpp (slidge.core.gateway.BaseGateway) –
- HELP = 'Disconnects active WhatsApp session without removing any linked device credentials. To...'[source]#
- async run(session, ifrom, *args)[source]#
Entry point of the command
- Parameters:
session (Optional[slidge_whatsapp.session.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
- Return type:
- class slidge_whatsapp.command.PairPhone(xmpp)[source]#
Bases:
slidge.command.Command
Abstract base class to implement gateway commands (chatbot and ad-hoc)
- Parameters:
xmpp (slidge.core.gateway.BaseGateway) –
- HELP = 'As an alternative to QR code verification, this allows you to complete registration by inputing...'[source]#
- async run(session, ifrom, *args)[source]#
Entry point of the command
- Parameters:
session (Optional[slidge_whatsapp.session.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
- Return type:
- async static finish(form_values, session, _ifrom)[source]#
- Parameters:
form_values (dict) –
session (slidge_whatsapp.session.Session) –
_ifrom (slixmpp.JID) –
- class slidge_whatsapp.command.ChangePresence(xmpp)[source]#
Bases:
slidge.command.Command
Abstract base class to implement gateway commands (chatbot and ad-hoc)
- Parameters:
xmpp (slidge.core.gateway.BaseGateway) –
- HELP = 'If you want to receive notifications in the WhatsApp official client,you need to set your...'[source]#
- async run(session, ifrom, *args)[source]#
Entry point of the command
- Parameters:
session (Optional[slidge_whatsapp.session.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
- Return type:
- async static finish(form_values, session, _ifrom)[source]#
- Parameters:
form_values (dict) –
session (slidge_whatsapp.session.Session) –
_ifrom (slixmpp.JID) –
- class slidge_whatsapp.command.SubscribeToPresences(xmpp)[source]#
Bases:
slidge.command.Command
Abstract base class to implement gateway commands (chatbot and ad-hoc)
- Parameters:
xmpp (slidge.core.gateway.BaseGateway) –
- HELP = "Subscribes to and refreshes contacts' presences; typically this is done automatically, but..."[source]#
- async run(session, ifrom, *args)[source]#
Entry point of the command
- Parameters:
session (Optional[slidge_whatsapp.session.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
- Return type: