From b915f1803acccb84c4e50e958024d5cda4344e64 Mon Sep 17 00:00:00 2001 From: Akamaru Date: Sat, 21 Jan 2017 19:25:19 +0100 Subject: [PATCH] fixes --- miku/bot.lua | 2 +- miku/plugins/figuya.lua | 4 ++-- miku/plugins/moe.lua | 3 +-- miku/plugins/plex.lua | 1 + 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/miku/bot.lua b/miku/bot.lua index bd45045..4e3e702 100644 --- a/miku/bot.lua +++ b/miku/bot.lua @@ -317,7 +317,7 @@ function bot:print_msg(msg) elseif msg.audio then filetext = '[Audio] ' elseif msg.document then - filetext = '[Datei] ' + filetext = '[Datei] ('..msg.document.file_name..') ' elseif msg.location then filetext = '[Standort] ' elseif msg.contact then diff --git a/miku/plugins/figuya.lua b/miku/plugins/figuya.lua index ef5d8e6..1410237 100644 --- a/miku/plugins/figuya.lua +++ b/miku/plugins/figuya.lua @@ -12,8 +12,8 @@ function figuya:get_figuya(figu) local data = json.decode(b) local title = data.title - if string.len(data.description) > 400 then - desc = string.sub(unescape(data.description:gsub("%b<>", "")), 1, 400)..'..' + if string.len(data.description) > 500 then + desc = string.sub(unescape(data.description:gsub("%b<>", "")), 1, 500)..'..' else desc = unescape(data.description)..'.' end diff --git a/miku/plugins/moe.lua b/miku/plugins/moe.lua index c199c57..6b73b81 100644 --- a/miku/plugins/moe.lua +++ b/miku/plugins/moe.lua @@ -34,8 +34,7 @@ function moe:action(msg, config, matches) utilities.send_reply(msg, config.errors.connection) return end - local file = download_to_file(photo_url) - utilities.send_photo(msg.chat.id, file, nil, msg.message_id) + utilities.send_photo(msg.chat.id, photo_url, nil, msg.message_id) end return moe \ No newline at end of file diff --git a/miku/plugins/plex.lua b/miku/plugins/plex.lua index 7b3aee7..f096027 100644 --- a/miku/plugins/plex.lua +++ b/miku/plugins/plex.lua @@ -68,6 +68,7 @@ function plex:get_plex(query) if data.grandparentTitle then from = ' (aus '..data.grandparentTitle..' ['..string.gsub(season..episode, 'S0E', 'SP')..']'..') ' + from = string.gsub(from, 'SP501', 'SP01') else from = '' end