forked from threeoh6000/joltik
17 lines
396 B
Lua
17 lines
396 B
Lua
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",""))
|