remove db and strange unicode at start

This commit is contained in:
Er2 2022-02-13 18:58:17 +03:00
parent 3bbccb94ab
commit 8f538ba65a
3 changed files with 2 additions and 18 deletions

View File

@ -1,4 +1,4 @@
return function(C, api, msg)
return function(C, api, msg)
local cmd = C.cmds[msg.cmd]
local owner = msg.from.id == C.config.owner
local l = msg.from.language_code

View File

@ -1,4 +1,4 @@
function table.indexOf(t, w)
function table.indexOf(t, w)
local i = {}
for k,v in pairs(t) do i[v] = k end
return i[w]

View File

@ -1,16 +0,0 @@
return function(Core)
local path = 'etc/db' -- from root
local time = 60 * 5 -- 5min
Core.db = require 'etc.db' (path)
local t = os.time()
Core:on('tick', function()
if os.time() - t >= time then
t = os.time()
print 'saving...'
Core.db:save()
end
end)
end