- Deaktiviere "Loading plugin" Meldung, da diese den Start und Reload des Bots verzögert
- Facebook: Wenn Bild privat ist, ignoriere es einfach
This commit is contained in:
parent
0f10b819b9
commit
4c22288396
@ -39,7 +39,7 @@ function bot:init(config) -- The function run when the bot is started or reloade
|
||||
enabled_plugins = load_plugins()
|
||||
for k,v in pairs(enabled_plugins) do
|
||||
local p = require('otouto.plugins.'..v)
|
||||
print('loading plugin',v)
|
||||
-- print('loading plugin',v)
|
||||
table.insert(self.plugins, p)
|
||||
self.plugins[k].name = v
|
||||
if p.init then p.init(self, config) end
|
||||
|
@ -156,8 +156,9 @@ function facebook:action(msg, config, matches)
|
||||
else
|
||||
photo_id = matches[4]
|
||||
end
|
||||
utilities.send_typing(self, msg.chat.id, 'upload_photo')
|
||||
local text, image_url = facebook:send_facebook_photo(photo_id, receiver)
|
||||
if not image_url then return end
|
||||
utilities.send_typing(self, msg.chat.id, 'upload_photo')
|
||||
local file = download_to_file(image_url)
|
||||
utilities.send_reply(self, msg, text, true)
|
||||
utilities.send_photo(self, msg.chat.id, file, nil, msg.message_id)
|
||||
|
Reference in New Issue
Block a user