This repository has been archived on 2021-04-24. You can view files and clone it, but cannot push or open issues or pull requests.
Mikubot-2/miku/plugins/hdf.lua
Andreas Bielawski 7025498768 Geportet:
- Cowsay
- Hallo!
- Hdf
- Insider
Fehlendes \n in der Hilfe von "me" gefixt
2016-08-17 17:48:11 +02:00

26 lines
664 B
Lua

local hdf = {}
function hdf:init(config)
hdf.triggers = utilities.triggers(self.info.username, config.cmd_pat):t('hdf', true).table
hdf.doc = '\n*/hdf*: Einfach mal die Fresse halten!'
end
hdf.command = 'hdf'
function hdf:action(msg, config)
local HDF_URL = 'https://anditest.perseus.uberspace.de/plugins/hdf'
local hdf_pics = {
"/hdf1.jpg",
"/hdf2.jpg",
"/hdf3.jpg",
"/hdf4.jpg",
"/hdf5.jpg"
}
local random_pic = math.random(#hdf_pics)
utilities.send_typing(self, msg.chat.id, 'upload_photo')
local file = download_to_file(HDF_URL..hdf_pics[random_pic])
utilities.send_photo(self, msg.chat.id, file)
end
return hdf