-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathmain.lua
56 lines (43 loc) · 1.26 KB
/
main.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
-- ok i know ths code is hot stinky garbage but it *works*, god damn-it.
-- it works most of the time. most of the time.
_G["discordia"] = require('discordia')
require("discordia-components")
_G["client"] = discordia.Client()
_G["prefix"] = "c!"
_G["json"] = require('libs/json')
_G["fs"] = require('fs')
--from https://github.com/DeltaF1/lua-tracery, TODO properly follow the license lmao
_G["tracery"] = require('libs/tracery')
_G["dpf"] = require('libs/dpf')
_G["inspect"] = require('libs/inspect')
_G["prosel"] = require('libs/prosel')
_G["vips"] = require('vips')
_G["http"] = require('coro-http')
-- load all the extensions
discordia.extensions()
-- import all the commands
_G['cmd'] = {}
-- import reaction commands
_G['cmdre'] = {}
_G['cmdcons'] = {}
_G['tr'] = {}
local rdb = dofile('commands/reloaddb.lua')
rdb.run(nil,nil,true)
print("exited rdb.run")
_G['sw'] = discordia.Stopwatch()
sw:start()
client:on('ready', function()
print('Logged in as '.. client.user.username)
end)
print("yay got past load ready")
client:on('messageCreate', function(message)
handlemessage(message)
end)
print("Resetting clocks")
resetclocks()
print("Clearing cache")
clearcache()
print("Stocking shop")
stockshop()
client:run(privatestuff.botid)
client:setGame("with cards | c!help")