Save the database way less often.
This commit is contained in:
parent
aa7e16013d
commit
64160e700c
2
bot.lua
2
bot.lua
@ -97,7 +97,6 @@ while is_started do -- Start a loop while the bot should be running.
|
|||||||
last_update = v.update_id
|
last_update = v.update_id
|
||||||
on_msg_receive(v.message)
|
on_msg_receive(v.message)
|
||||||
end
|
end
|
||||||
save_data('otouto.db', database)
|
|
||||||
else
|
else
|
||||||
print(config.errors.connection)
|
print(config.errors.connection)
|
||||||
end
|
end
|
||||||
@ -111,6 +110,7 @@ while is_started do -- Start a loop while the bot should be running.
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
save_data('otouto.db', database) -- Save the database.
|
||||||
last_cron = os.time() -- And finally, update the variable.
|
last_cron = os.time() -- And finally, update the variable.
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user