-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathinit.lua
64 lines (51 loc) · 1.15 KB
/
init.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
-- Discordia injection from https://github.com/Bilal2453/discordia-interactions
local discordia = require("discordia")
do
local API = require("client/API")
local discordia_api = discordia.class.classes.API
API.request = discordia_api.request
for k, v in pairs(API) do
rawset(discordia_api, k, v)
end
end
do
local Client = require("client/Client")
local discordia_client = discordia.class.classes.Client
for k, v in pairs(Client) do
rawset(discordia_client, k, v)
end
end
do
local EventHandler = require("client/EventHandler")
local client = discordia.Client{
logFile = '',
}
local events = client._events
for k, v in pairs(EventHandler) do
if rawget(events, k) then
local old_event = events[k]
events[k] = function(...)
v(...)
return old_event(...)
end
else
events[k] = v
end
end
end
return {
util = {
appcmd = function(client, guild)
local appcmd = require("./util/appcmd.lua")
appcmd(client, guild)
end,
test = function(client, guild)
local test = require("./util/test.lua")
test(client, guild)
end,
tools = function()
local tools = require("./util/tools.lua")
return tools
end
}
}