This repository was archived by the owner on Nov 20, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.lua
More file actions
43 lines (40 loc) · 1.32 KB
/
init.lua
File metadata and controls
43 lines (40 loc) · 1.32 KB
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
local discordia = require('discordia')
local client = discordia.Client()
client:on('ready', function()
print('Final | \27[1m\27[32m[INFO]\27[0m | Logged in as ' .. client.user.username)
end)
client:on('messageCreate', function(message)
-- TODO: possibly set this to a switch case
if message.content == '!ping' then
message.channel:send('Pong!')
end
if message.content == "!bfiles" then
message.channel:send('https://github.com/bobbbay/dotfiles')
end
if message.content == '!gfiles' then
message.channel:send('https://github.com/gytis-ivaskevicius/nixfiles')
end
if message.content == '!jfiles' then
message.channel:send('https://github.com/DieracDelta/nix_home_manager_configs')
end
if message.content == '!ygentoo' then
file = io.open('content/ygentoo', 'rb')
io.input(file)
for i = 1, 19 do
message.channel:send(io.read())
end
io.close(file)
end
if message.content == '!ynix' then
file = io.open('content/ynix', 'rb')
io.input(file)
for i = 1, 19 do
message.channel:send(io.read())
end
io.close(file)
end
if message.content == '!q' then
message.user.roles.add('Vimmer')
end
end)
client:run('Bot ' .. os.getenv('BOT_CODE'))