7025498768
- Cowsay - Hallo! - Hdf - Insider Fehlendes \n in der Hilfe von "me" gefixt
27 lines
599 B
Lua
27 lines
599 B
Lua
local cowsay = {}
|
|
|
|
function cowsay:init(config)
|
|
cowsay.triggers = utilities.triggers(self.info.username, config.cmd_pat):t('cowsay', true).table
|
|
cowsay.doc = '\n*/cowsay* _<Text>_'
|
|
end
|
|
|
|
cowsay.command = 'cowsay <Text>'
|
|
|
|
function cowsay:action(msg, config)
|
|
local input = utilities.input_from_msg(msg)
|
|
if not input then
|
|
utilities.send_reply(self, msg, cowsay.doc, true)
|
|
return
|
|
end
|
|
|
|
if string.match(input, '"') then
|
|
text = 'Vergiss es!'
|
|
else
|
|
text = '```'..run_command('cowsay "'..input..'"')..'```'
|
|
end
|
|
|
|
utilities.send_reply(self, msg, text, true)
|
|
end
|
|
|
|
return cowsay
|