remove db and strange unicode at start
This commit is contained in:
		
							parent
							
								
									3bbccb94ab
								
							
						
					
					
						commit
						8f538ba65a
					
				
					 3 changed files with 2 additions and 18 deletions
				
			
		|  | @ -1,4 +1,4 @@ | ||||||
| return function(C, api, msg) | return function(C, api, msg) | ||||||
|   local cmd = C.cmds[msg.cmd] |   local cmd = C.cmds[msg.cmd] | ||||||
|   local owner = msg.from.id == C.config.owner |   local owner = msg.from.id == C.config.owner | ||||||
|   local l = msg.from.language_code |   local l = msg.from.language_code | ||||||
|  |  | ||||||
|  | @ -1,4 +1,4 @@ | ||||||
| function table.indexOf(t, w) | function table.indexOf(t, w) | ||||||
|   local i = {} |   local i = {} | ||||||
|   for k,v in pairs(t) do i[v] = k end |   for k,v in pairs(t) do i[v] = k end | ||||||
|   return i[w] |   return i[w] | ||||||
|  |  | ||||||
|  | @ -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 |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue