add the shtuff
This commit is contained in:
commit
636b989184
2 changed files with 21 additions and 0 deletions
4
.gitignore
vendored
Normal file
4
.gitignore
vendored
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
deps/
|
||||||
|
discordia.log
|
||||||
|
gateway.json
|
||||||
|
token.txt
|
17
bot.lua
Normal file
17
bot.lua
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
local discordia = require('discordia')
|
||||||
|
local client = discordia.Client()
|
||||||
|
|
||||||
|
client:on('ready', function()
|
||||||
|
print('Logged in as '.. client.user.username)
|
||||||
|
end)
|
||||||
|
|
||||||
|
client:on('messageCreate', function(message)
|
||||||
|
if message.content == '.ping' then
|
||||||
|
message.channel:send('Pong!')
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
local f = io.open("token.txt", "r")
|
||||||
|
local token = f:read("*a")
|
||||||
|
f:close()
|
||||||
|
client:run('Bot ' .. token:gsub("\n",""))
|
Reference in a new issue