Fix crash on reminder id 0
This commit is contained in:
parent
bac18a91cc
commit
381903a72a
1 changed files with 1 additions and 1 deletions
|
@ -16,7 +16,7 @@ export const RemindersDeleteCmd = remindersCommand({
|
|||
reminders.sort(sorter("remind_at"));
|
||||
const lastNum = reminders.length + 1;
|
||||
|
||||
if (args.num > lastNum || args.num < 0) {
|
||||
if (args.num > lastNum || args.num <= 0) {
|
||||
sendErrorMessage(pluginData, msg.channel, "Unknown reminder");
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue