Commit f5973c00283687f5e89222c705046750ef88e992

Authored by Adhidarma Hadiwinoto
1 parent 87210e8c08
Exists in master

delay before send config

Showing 2 changed files with 4 additions and 2 deletions Side-by-side Diff

... ... @@ -8,4 +8,6 @@
8 8 "greeting_prefix": "",
9 9 "evo_url": "",
10 10 "smsc": "",
  11 + "delay_on_message": 300,
  12 + "dump_chat_ids_interval": 60000
11 13 }
... ... @@ -99,7 +99,7 @@ bot.on('text', function (msg) {
99 99 bot.sendMessage(msg.chat.id, greeting_prefix + ' ' + msg.text);
100 100 setTimeout(
101 101 evo.onMessage,
102   - 300,
  102 + config.delay_on_message,
103 103 from, msg.text, msg.date * 1000
104 104 );
105 105 });
... ... @@ -114,5 +114,5 @@ function dumpChatIds() {
114 114 }
115 115  
116 116 if (config.dump_chat_ids_interval) {
117   - setInterval(dumpChatIds, config.dump_chat_ids_interval * 1000);
  117 + setInterval(dumpChatIds, config.dump_chat_ids_interval);
118 118 }