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.
2016-08-17 17:48:11 +02:00
|
|
|
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)
|
2018-01-25 14:34:42 +01:00
|
|
|
local HDF_URL = 'https://brawlbot.tk/plugins/hdf'
|
2016-08-17 17:48:11 +02:00
|
|
|
local hdf_pics = {
|
|
|
|
"/hdf1.jpg",
|
|
|
|
"/hdf2.jpg",
|
|
|
|
"/hdf3.jpg",
|
|
|
|
"/hdf4.jpg",
|
|
|
|
"/hdf5.jpg"
|
|
|
|
}
|
|
|
|
local random_pic = math.random(#hdf_pics)
|
2016-08-24 17:18:17 +02:00
|
|
|
utilities.send_typing(msg.chat.id, 'upload_photo')
|
2016-08-17 17:48:11 +02:00
|
|
|
local file = download_to_file(HDF_URL..hdf_pics[random_pic])
|
2016-08-24 17:18:17 +02:00
|
|
|
utilities.send_photo(msg.chat.id, file)
|
2016-08-17 17:48:11 +02:00
|
|
|
end
|
|
|
|
|
|
|
|
return hdf
|