-
Notifications
You must be signed in to change notification settings - Fork 0
editreminder
The /editreminder
command allows users to edit existing snitch or pearl reminders they have previously set. The command presents a form (modal) where the user can edit details such as the reminder's name, schedule, expiration time, and for snitches, coordinates and namelayer.
/editreminder [subcommand] [options]
-
pearl
- Edit a pearl reminder.
-
Required option:
- name: The name of the pearl reminder to be edited.
-
snitch
- Edit a snitch reminder.
-
Required options:
- name: The name of the snitch reminder to be edited.
- coordinate: The coordinates of the snitch to help differentiate between multiple snitches with the same name.
-
Input Matching:
The command retrieves all reminders from the database, decrypts the relevant data, and checks for a match based on the provided input (name and optionally coordinates for snitches).- For pearl reminders, it matches the reminder by the user ID and name.
- For snitch reminders, it matches by the user ID, name, and coordinates.
-
Edit Modal:
Once the relevant reminder is found, a modal is presented to the user. This modal contains several fields where users can edit the reminder details. Fields that the user does not want to change can be left blank. -
Modal Fields:
For pearl reminders, the following fields are displayed in the modal:
- Edit Name (optional): The user can change the name of the pearl reminder.
- Edit Schedule (optional): The schedule can be modified (e.g., "2 hours" or "1 week").
- Edit Expiration Time (optional): The expiration timestamp can be updated.
For snitch reminders, in addition to the above fields, the following are also available:
- Edit Coordinates (optional): The coordinates of the snitch can be updated.
- Edit Namelayer (optional): The namelayer associated with the snitch can be modified.
/editreminder pearl name: MyPearlReminder
The bot will open a modal allowing the user to edit the name, schedule, and expiration time of the pearl reminder called MyPearlReminder
.
/editreminder snitch name: MySnitchReminder coordinate: -100, 64, 250
The bot will open a modal allowing the user to edit the name, schedule, expiration time, coordinates, and namelayer of the snitch reminder called MySnitchReminder
at coordinates -100, 64, 250
.
- The user runs the
/editreminder
command with the appropriate subcommand (pearl
orsnitch
), providing the required information (name, and coordinates for snitches). - The bot checks the database for matching reminders belonging to the user.
- If a matching reminder is found, the bot displays a modal with fields to edit the reminder.
- The user fills in the fields they wish to change, and the reminder is updated.
- If no matching reminder is found for the provided name (or coordinates in the case of snitches), the bot will not show the modal and may respond with an error message indicating the reminder was not found.