3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

Fix crash on reminder id 0

This commit is contained in:
Dark 2020-07-29 01:32:57 +02:00
parent bac18a91cc
commit 381903a72a

View file

@ -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;
}