From ad7d93a05fffd76ad9a7937429983885e00c7634 Mon Sep 17 00:00:00 2001 From: dupie Date: Thu, 2 Jul 2015 18:56:49 -0400 Subject: [PATCH] fixed reminders --- bot.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bot.lua b/bot.lua index 0e2b97b..2df7a2a 100644 --- a/bot.lua +++ b/bot.lua @@ -3,7 +3,7 @@ HTTP = require('socket.http') HTTPS = require('ssl.https') -JSON = require('dkjson') +JSON = require('cjson') URL = require('socket.url') VERSION = 2.01 @@ -89,7 +89,7 @@ while is_started == true do end end - for k,v in pairs(reminders) do + for i,v in pairs(reminders) do if os.time() > v.alarm then send_message(v.chat_id, 'Reminder: '..v.text) table.remove(reminders, i)