add the shtuff

This commit is contained in:
abbie 2022-11-03 18:55:00 +00:00
commit 636b989184
No known key found for this signature in database
GPG key ID: A575D2415E5E5B6D
2 changed files with 21 additions and 0 deletions

4
.gitignore vendored Normal file
View file

@ -0,0 +1,4 @@
deps/
discordia.log
gateway.json
token.txt

17
bot.lua Normal file
View 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",""))