d9a6836dd5
- Ergänze Antworten da, wo ich es vergessen habe...
22 lines
619 B
Lua
22 lines
619 B
Lua
local porndoge = {}
|
|
|
|
function porndoge:init(config)
|
|
porndoge.triggers = utilities.triggers(self.info.username, config.cmd_pat):t('pdoge', true).table
|
|
porndoge.doc = [[*
|
|
]]..config.cmd_pat..[[pdoge*]]
|
|
end
|
|
|
|
porndoge.command = 'pdoge'
|
|
|
|
function porndoge:action(msg, config)
|
|
utilities.send_typing(self, msg.chat.id, 'upload_photo')
|
|
local url = 'https://porndoge.herokuapp.com/'
|
|
local file = download_to_file(url, 'porndoge.png')
|
|
if not file then
|
|
utilities.send_reply(self, msg, config.errors.connection)
|
|
return
|
|
end
|
|
utilities.send_photo(self, msg.chat.id, file, nil, msg.message_id)
|
|
end
|
|
|
|
return porndoge |