Closed jimenezj8 closed 1 year ago
Use this API method to get all currently scheduled messages
Use this API method to delete a particular scheduled message
If I'm using a scheduled message as the action trigger...I probably don't need to store the scheduled message IDs unless I pre-schedule all the messages
I'm going to revert all the pieces that have to do with the message IDs
Make a command,
/cancel_game
, which will allow a user to select a game by ID, and cancel a scheduled game.This slash command will fail if the game has already started. If a game starts with less than 2 participants, the game will auto-cancel. All associated rounds will be deleted.
db_utils.py: cancel_game
game_id
game.canceled
valueTRUE
game.announcement_message_id
game.announcement_message_id
NULL
db_utils.py: cancel_rounds
withgame_id
list[str]
containing the associated message IDs, if any, for both Game and Round announcementsdb_utils.py: cancel_rounds
game_id
round.canceled
recordsTRUE
round.announcement_message_id
recordsround.announcement_message_id
recordsNULL
list[str]
containing associated message IDs, if anydb_utils.py: update_game_announcement_message_id
game_id: int
message_id: str
SlackResponse
to variable for scheduled announcement messagedb_utils.py: update_game_announcement_message_id
game_start_handler
)game_id
in message metadata to check participantschat.postMessage
with message text and metadata to channeldb_utils.py: cancel_game