Closed GeordieP closed 1 year ago
There's a snag on this - the API doesn't return a message object for an interaction response.
Snag resolved:
LFGREG:123-456-7890
"LFGREG:" <> reg_id
reg_id
to update the DB item, storing the message IDAfter this process, the database keeps track of channels that have had the registration command run in them, as well as the ID of the bot-sent introduction message. We can then use that persisted message ID to ask the API if that message has been deleted, and do logic to prevent unnecessary re-registering as well as any other operations that may need the msg ID (e.g. retroactively editing the init message for all registered channels, to change the text or list new bot features.)
Currently we have protection against registering the same channel more than once, but it would be better to check for the existence of the bot's initial setup message, so a channel isn't "stuck" as registered - ideally, we would be able to re-register if the init message is deleted by a moderator.
registration message:
init command handler changes: