added in figlet functionality

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

@ -0,0 +1,14 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "lua",
"request": "launch",
"name": "Debug",
"program": "${file}"
}
]
}

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

@ -59,8 +59,11 @@ client:on('messageCreate', function(message)
end)
client:on('messageCreate', function(message)
if tools.messageDectection(message, "moduleTest") == true then
message.channel:send(basicCommands.helloWorld())
if tools.messageDectection(message, "figlet ") == true then
local figletthis = string.sub(message.content, 9)
local figlet = basicCommands.figlet(figletthis)
local result = "```fix" .. "\n" .. figlet .. "```"
message.channel:send(result)
end
end)

Loading…
Cancel
Save