Compare commits

...

2 commits

Author SHA1 Message Date
Er2
f50fe9e35b update tg lib 2022-01-23 18:23:54 +03:00
Er2
c7c2ccc664 luajit support 2022-01-23 18:18:53 +03:00
4 changed files with 7 additions and 6 deletions

@ -1 +1 @@
Subproject commit 30f7203c5fe69e875dbd29a4da9fe0c5ab1ddc9b
Subproject commit 4dec8003ed89e5a05ee992448747096f72ce718b

View file

@ -1,3 +1,3 @@
package.path = 'etc/?.lua;etc/?/init.lua;' .. package.path
package.path = 'etc/?.lua;etc/?/init.lua;?.lua;?/init.lua;' .. package.path
require 'src.parts.core'

View file

@ -1,4 +1,4 @@
local config = require 'config'
local config = require 'config'
local Core = {
config = config,
@ -14,8 +14,9 @@ function Core:load(what)
print(('Loading %s (%d / %d) %s...'):format(what:sub(0, -2), i, s, v))
-- Lint
if pcall(require, 'src.'.. what ..'.'.. v) then
local a=require('src.'.. what ..'.'.. v)
local e, a = pcall(require, 'src.'.. what ..'.'.. v)
print(e, a)
if e then
if what == 'events' then self.api:on(v, a)
elseif what == 'cmds' then self.cmds[v] = a
elseif what == 'parts' then a(self)

View file

@ -1,3 +1,3 @@
#!/bin/sh
cd $(dirname $0)
lua5.3 init.lua
luajit init.lua || lua5.3 init.lua