cowsay added

pull/1/head
Astoria Floyd 3 years ago
parent 63f32dccc7
commit 30115e0562

@ -10,4 +10,10 @@ function basicCommands.figlet(string)
return result
end
function basicCommands.cowsay(string)
local figleted = io.popen("cowsay ".. string)
local result = figleted:read("*all")
return result
end
return basicCommands

@ -67,4 +67,13 @@ client:on('messageCreate', function(message)
end
end)
client:on('messageCreate', function(message)
if tools.messageDectection(message, "cowsay ") == true then
local cowsay = string.sub(message.content, 9)
local cowsaid = basicCommands.cowsay(cowsay)
local result = "```fix" .. "\n" .. cowsaid .. "```"
message.channel:send(result)
end
end)
client:run('Bot ODczMjU1Mjk2MDI0MzIyMDU5.YQ1wXg.BbXq1fu-4nlG95EkLkHujVEObG4')

Loading…
Cancel
Save