eventbot.receiver package¶
Submodules¶
eventbot.receiver.eventbot module¶
eventbot receiver implementation.
General flow:
1. User messages bot: @eventbot create
1. eventbot receives a message via ``create_event_command` function and responds with an interactive message,
letting the user click a create button to create a new event
1. User clicks create button
1. eventbot receives interactive message via interactive_event_handler
function and responds back with a dialog
1. User fills in dialog, and submits the dialog
1. eventbot receives interactive message via handle_interactive_event_for_events
function and responds back, with
an edit to the existing message, replacing the values in the message, and also likely includes an ephemeral message in the response
1. Users interact with the message
1. eventbot receives interactive message via interactive_event_handler
function and responds back, with
an edit to the existing message, or a dialog, depending on the action.
-
eventbot.receiver.eventbot.
create_event_command
(event: Dict) → Dict¶ create_event_command receives
create
command messages targeted to this bot. It responds with an interactive message, with aneventbot_events
callback.The passed-in event is unused, but required by the router.
-
eventbot.receiver.eventbot.
handle_interactive_event_for_events
(event: Dict) → Dict¶ This function receives interactive component events for the
eventbot_events
callback, specifically for the typedialog_submission
. It determines which type of dialog was submitted and routes it to the appropriate internal function, to handle that submission.
-
eventbot.receiver.eventbot.
interactive_event_handler
(event: Dict) → Dict¶ This function receives interactive component events for callback
eventbot_events
, without a specific event type. In this bot’s context, this function is routed to when a user clicks on any button in the interactive message. It determines the action (edit, register, unregister, etc.) and calls the appropriate internal function.