"Clear" command's "dismiss" button doesn't check for permissions #2

Closed
opened 2022-11-20 22:30:29 +01:00 by bea · 1 comment
Owner

Make it so that only who ran the command can click the "delete" button.

example flow:

    command is ran ->
    (messages are deleted)
    reply message ID is saved in database, "pending deletion" with expiry date
    reply message ID is saved in database together with user ID
    run a scheduler for 60 seconds to disable the button
    
    if bot is restarted in the meanwhile, check the expiry date
    -> disable button instantly or
    -> run another scheduler
    (first one could potentially be the second with a zero delay)
    
    
    
    scheduler:
    -> check if message still exists
    -> disable button interaction
    -> remove from database (both tabled)

Make it so that only who ran the command can click the "delete" button. example flow: ``` command is ran -> (messages are deleted) reply message ID is saved in database, "pending deletion" with expiry date reply message ID is saved in database together with user ID run a scheduler for 60 seconds to disable the button if bot is restarted in the meanwhile, check the expiry date -> disable button instantly or -> run another scheduler (first one could potentially be the second with a zero delay) scheduler: -> check if message still exists -> disable button interaction -> remove from database (both tabled) ```
bea changed title from Clear command disable button doesn't check for permissions to "Clear" command's "disable" button doesn't check for permissions 2022-11-20 22:30:44 +01:00
bea changed title from "Clear" command's "disable" button doesn't check for permissions to "Clear" command's "delete" button doesn't check for permissions 2022-11-20 22:30:53 +01:00
bea changed title from "Clear" command's "delete" button doesn't check for permissions to "Clear" command's "dismiss" button doesn't check for permissions 2022-11-21 15:18:43 +01:00
Author
Owner

Fixed with commits 98a162a33b 5ee7321978 5ee7321978

Fixed with commits 98a162a33b6e7ef12cce3906d6b9f4add5fba025 5ee7321978b1a6a5cb40b74a7faacbf4e5c5515d 5ee7321978b1a6a5cb40b74a7faacbf4e5c5515d
bea closed this issue 2022-11-21 15:19:09 +01:00
bea added the
bug
label 2022-11-21 19:57:49 +01:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: bea/HidekoBot#2
No description provided.