local gifeye = {} function gifeye:init(config) gifeye.triggers = { "https?://gifeye.com/(%d+)$", "^/gifeye (%d+)$", "^/ge (%d+)$" } gifeye.doc = [[* ]]..config.cmd_pat..[[ge* __: Sendet Bild von Gifeye (NSFW)]] end gifeye.command = 'ge ' function gifeye:action(msg, config, matches) local url = 'http://i.gifeye.com/'..matches[1]..'.gif' utilities.send_typing(msg.chat.id, 'upload_document') local file = download_to_file(url) if not file then utilities.send_reply(msg, config.errors.results) return end if string.starts(msg.text_lower, '/ge') or string.starts(msg.text_lower, '/gifeye') then source = 'http://gifeye.com/'..matches[1] else source = nil end utilities.send_document(msg.chat.id, file, source, msg.message_id) end return gifeye