This repository has been archived on 2023-10-28. You can view files and clone it, but cannot push or open issues or pull requests.
joltik/bot.lua
2022-11-03 18:55:00 +00:00

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",""))