Multi Platform Handlers
These functions, unlike the CORE ones, will be like handlers, calling other platform-based functions depending on the platform selected in the platform
variable when starting the framework.
So if we need to send a message, we’ll use SendMessage()
and in there we’ll handle the correct platform to send the message.
- async SendMessage(title: str = None, description: str = None, color_ds: str = None, color_sl: str = None, channel=None, image=None, author=None, buttons=None, text_input=None, checkboxes=None)
Message sending controller for all platforms.
- title
The title of the message.
- Type:
str
- Required:
True
- description
The description/main text of the message.
- Type:
str
- Required:
True
- color_ds
Parameter with the color of the embedded message.
Note
This parameter is only used for Discord.
- Type:
str
- Required:
False
- color_sl
Parameter with the color of the embedded message.
Note
This parameter is only used for Slack. Go to Slack.Formatter for references.
- Type:
str
- Required:
False
- channel
Parameter with the desired destination channel.
Note
This parameter is only used for Slack.
- Type:
str
- Required:
False
- image
Note
This parameter is only used for Slack. Go to Slack.Formatter for references.
- Type:
array
- Required:
False
- author
Note
This parameter is only used for Slack. Go to Slack.Formatter for references.
- Type:
array
- Required:
False
- buttons
Note
This parameter is only used for Slack. Go to Slack.Formatter for references.
- Type:
array
- Required:
False
- text_input
Note
This parameter is only used for Slack. Go to Slack.Formatter for references.
- Type:
array
- Required:
False
- checkboxes
Note
This parameter is only used for Slack. Go to Slack.Formatter for references.
- Type:
array
- Required:
False
- async EditMessage(title: str = None, description: str = None, color_ds: str = None, color_sl: str = None, response=None, variable=None, image=None, author=None, buttons=None, text_input=None, checkboxes=None)
Message editing controller for all platforms (which allow editing messages).
- title
The title of the message.
- Type:
str
- Required:
True
- description
The description/main text of the message.
- Type:
str
- Required:
True
- color_ds
Parameter with the color of the embedded message.
Note
This parameter is only used for Discord.
- Type:
str
- Required:
False
- color_sl
Parameter with the color of the embedded message.
Note
This parameter is only used for Slack. Go to Slack.Formatter for references.
- Type:
str
- Required:
False
- response
Parameter with the previous response.
Note
This parameter is only used for Slack.
- Type:
array
- Required:
False
- variable
Parameter with the previous response, containing the method to edit messages.
Note
This parameter is only used for Discord.
- Type:
str
- Required:
False
- image
Note
This parameter is only used for Slack. Go to Slack.Formatter for references.
- Type:
array
- Required:
False
- author
Note
This parameter is only used for Slack. Go to Slack.Formatter for references.
- Type:
array
- Required:
False
- buttons
Note
This parameter is only used for Slack. Go to Slack.Formatter for references.
- Type:
array
- Required:
False
- text_input
Note
This parameter is only used for Slack. Go to Slack.Formatter for references.
- Type:
array
- Required:
False
- checkboxes
Note
This parameter is only used for Slack. Go to Slack.Formatter for references.
- Type:
array
- Required:
False
- async SendIncident(inject)
Send the current incident to the correct player.
- inject
- Type:
array
- Required:
True
- async RegexHandler(ack=None, body=None, payload=None, inbox=None)
In charge of the inboxes gathering part.
Note
This function is just used by WhatsApp and Slack.
- ack
- Type:
object
- Required:
False
- body
- Type:
array
- Required:
false
- payload
- Type:
array
- Required:
false
- inbox
- Type:
str
- Required:
false
- async InboxesAuto(message=None)
Handler for the Automatic gathering of inboxes.
- message
- Type:
str
- Required:
False
- async SendPoll(inject)
Send the current poll to the correct player.
- inject
- Type:
array
- Required:
True
- async PollAnswerHandler(ack=None, body=None, payload=None, query=None)
Detects the answer in the poll sent. Modifies the poll message and notifies the game master about the selected option.
- ack
Acknowledge object to inform Slack that we have received the interaction.
- Type:
obj
- Required:
False
Note
This parameter is only used for Slack.
- body
The body of the interaction.
- Type:
obj
- Required:
False
Note
This parameter is only used for Slack.
- payload
The user’s input.
- Type:
obj
- Required:
False
Note
This parameter is only used for Slack.
- query
The query of the message.
- Type:
obj
- Required:
False
Note
This parameter is only used for Discord.