-
Notifications
You must be signed in to change notification settings - Fork 0
removereminder
The /removereminder
command allows users to remove snitch or pearl reminders from their reminder list. This command offers various options for removing specific reminders, bulk removing snitches based on their namelayer, or even deleting all reminders.
/removereminder [subcommand] [options]
-
pearl
Removes a specific pearl reminder.-
Required option:
-
name
(string): The name of the pearl reminder to remove.
-
-
Required option:
-
snitch
Removes a specific snitch reminder.-
Required options:
-
name
(string): The name of the snitch reminder. -
coordinate
(string): The coordinates of the snitch reminder.
-
-
Required options:
-
bulk
Removes multiple snitch reminders associated with a specific namelayer.-
Required option:
-
namelayer
(string): The namelayer associated with the snitches to be removed.
-
-
Required option:
-
all
Removes all reminders (both snitch and pearl) owned by the user. This is a dangerous action that requires confirmation.
-
Subcommand Execution:
The user invokes the command with one of the four subcommands:pearl
,snitch
,bulk
, orall
. -
Database Search:
The bot searches the reminder database for the user’s reminders. For:-
Pearl reminders: It matches the
name
provided with the user's reminders. -
Snitch reminders: It matches the
name
andcoordinate
provided with the user's snitch reminders. -
Bulk removal: It matches the provided
namelayer
with the user’s snitch reminders.
-
Pearl reminders: It matches the
-
Reminder Deletion:
- Once a match is found, the bot deletes the relevant reminder from the database.
- It also removes any related cached data from the in-memory cache using the
CacheManager
.
-
Confirmation for 'all' Subcommand:
- For the
all
subcommand, the bot prompts the user with confirmation buttons. Upon confirmation, all reminders are deleted, otherwise the action is canceled.
- For the
/removereminder pearl name: MyPearlReminder
This removes the pearl reminder named MyPearlReminder
.
/removereminder snitch name: MySnitchReminder coordinate: -100,64,250
This removes the snitch reminder named MySnitchReminder
located at coordinates -100,64,250
.
/removereminder bulk namelayer: MyNamelayer
This removes all snitch reminders associated with the namelayer MyNamelayer
.
/removereminder all
This triggers a confirmation prompt to delete all reminders owned by the user.
- The user invokes the
/removereminder all
command. - The bot sends a confirmation prompt with
Confirm
andCancel
buttons:- Confirm: Proceeds with deleting all reminders.
- Cancel: Aborts the action, and the reminders remain intact.
- If no response is received within 15 seconds, the operation is automatically canceled.
- If the provided reminder name (or coordinates in the case of snitches) does not match any reminders, the bot responds with an error message asking the user to check their input.
- For the
bulk
subcommand, if the namelayer provided does not match any of the user’s reminders, an error message is returned. - If there is an issue with deletion (e.g., no matching reminders are found), the bot returns a message indicating the problem.