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 permissions2022-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 permissions2022-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 permissions2022-11-21 15:18:43 +01:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Make it so that only who ran the command can click the "delete" button.
example flow:
Clear command disable button doesn't check for permissionsto "Clear" command's "disable" button doesn't check for permissions"Clear" command's "disable" button doesn't check for permissionsto "Clear" command's "delete" button doesn't check for permissions"Clear" command's "delete" button doesn't check for permissionsto "Clear" command's "dismiss" button doesn't check for permissionsFixed with commits
98a162a33b5ee73219785ee7321978