Ersetzte "anditest.perseus.uberspace.de" durch "brawlbot.tk"

This commit is contained in:
Akamaru 2018-01-25 14:34:42 +01:00
parent 06d0042365
commit cfa96e6505
21 changed files with 28 additions and 29 deletions

View File

@ -30,7 +30,7 @@ function adfly:inline_callback(inline_query, config, matches)
if not url then abort_inline_query(inline_query) return end if not url then abort_inline_query(inline_query) return end
if url == 'NOTFOUND' then abort_inline_query(inline_query) return end if url == 'NOTFOUND' then abort_inline_query(inline_query) return end
local results = '[{"type":"article","id":"1","title":"Verlängerte URL","description":"'..url..'","url":"'..url..'","thumb_url":"https://anditest.perseus.uberspace.de/inlineQuerys/generic/internet.jpg","thumb_width":165,"thumb_height":150,"hide_url":true,"input_message_content":{"message_text":"'..url..'"}}]' local results = '[{"type":"article","id":"1","title":"Verlängerte URL","description":"'..url..'","url":"'..url..'","thumb_url":"https://brawlbot.tk/inlineQuerys/generic/internet.jpg","thumb_width":165,"thumb_height":150,"hide_url":true,"input_message_content":{"message_text":"'..url..'"}}]'
utilities.answer_inline_query(inline_query, results, 3600, true) utilities.answer_inline_query(inline_query, results, 3600, true)
end end

View File

@ -40,7 +40,7 @@ function bitly:inline_callback(inline_query, config, matches)
if not url then abort_inline_query(inline_query) return end if not url then abort_inline_query(inline_query) return end
local results = '[{"type":"article","id":"2","title":"Verlängerte URL","description":"'..url..'","url":"'..url..'","thumb_url":"https://anditest.perseus.uberspace.de/inlineQuerys/generic/internet.jpg","thumb_width":165,"thumb_height":150,"hide_url":true,"input_message_content":{"message_text":"'..url..'"}}]' local results = '[{"type":"article","id":"2","title":"Verlängerte URL","description":"'..url..'","url":"'..url..'","thumb_url":"https://brawlbot.tk/inlineQuerys/generic/internet.jpg","thumb_width":165,"thumb_height":150,"hide_url":true,"input_message_content":{"message_text":"'..url..'"}}]'
utilities.answer_inline_query(inline_query, results, 3600) utilities.answer_inline_query(inline_query, results, 3600)
end end

View File

@ -47,7 +47,7 @@ function currency:inline_callback(inline_query, config, matches)
else else
title = amount..' '..base..' entsprechen' title = amount..' '..base..' entsprechen'
end end
local results = '[{"type":"article","id":"20","title":"'..title..'","description":"'..value..' '..to..'","thumb_url":"https://anditest.perseus.uberspace.de/inlineQuerys/currency/cash.jpg","thumb_width":157,"thumb_height":140,"input_message_content":{"message_text":"'..output..'","parse_mode":"Markdown"}}]' local results = '[{"type":"article","id":"20","title":"'..title..'","description":"'..value..' '..to..'","thumb_url":"https://brawlbot.tk/inlineQuerys/currency/cash.jpg","thumb_width":157,"thumb_height":140,"input_message_content":{"message_text":"'..output..'","parse_mode":"Markdown"}}]'
utilities.answer_inline_query(inline_query, results, 3600) utilities.answer_inline_query(inline_query, results, 3600)
end end

View File

@ -18,10 +18,10 @@ function echo:inline_callback(inline_query, config, matches)
-- enable custom markdown button -- enable custom markdown button
if text:match('%[.*%]%(.*%)') or text:match('%*.*%*') or text:match('_.*_') or text:match('`.*`') then if text:match('%[.*%]%(.*%)') or text:match('%*.*%*') or text:match('_.*_') or text:match('`.*`') then
results = results..'{"type":"article","id":"3","thumb_url":"https://anditest.perseus.uberspace.de/inlineQuerys/echo/custom.jpg","title":"Eigenes Markdown","description":"'..text..'","input_message_content":{"message_text":"'..text..'","parse_mode":"Markdown"}},' results = results..'{"type":"article","id":"3","thumb_url":"https://brawlbot.tk/inlineQuerys/echo/custom.jpg","title":"Eigenes Markdown","description":"'..text..'","input_message_content":{"message_text":"'..text..'","parse_mode":"Markdown"}},'
end end
local results = results..'{"type":"article","id":"4","thumb_url":"https://anditest.perseus.uberspace.de/inlineQuerys/echo/fett.jpg","title":"Fett","description":"*'..text..'*","input_message_content":{"message_text":"<b>'..text..'</b>","parse_mode":"HTML"}},{"type":"article","id":"5","thumb_url":"https://anditest.perseus.uberspace.de/inlineQuerys/echo/kursiv.jpg","title":"Kursiv","description":"_'..text..'_","input_message_content":{"message_text":"<i>'..text..'</i>","parse_mode":"HTML"}},{"type":"article","id":"6","thumb_url":"https://anditest.perseus.uberspace.de/inlineQuerys/echo/fixedsys.jpg","title":"Feste Breite","description":"`'..text..'`","input_message_content":{"message_text":"<code>'..text..'</code>","parse_mode":"HTML"}}]' local results = results..'{"type":"article","id":"4","thumb_url":"https://brawlbot.tk/inlineQuerys/echo/fett.jpg","title":"Fett","description":"*'..text..'*","input_message_content":{"message_text":"<b>'..text..'</b>","parse_mode":"HTML"}},{"type":"article","id":"5","thumb_url":"https://brawlbot.tk/inlineQuerys/echo/kursiv.jpg","title":"Kursiv","description":"_'..text..'_","input_message_content":{"message_text":"<i>'..text..'</i>","parse_mode":"HTML"}},{"type":"article","id":"6","thumb_url":"https://brawlbot.tk/inlineQuerys/echo/fixedsys.jpg","title":"Feste Breite","description":"`'..text..'`","input_message_content":{"message_text":"<code>'..text..'</code>","parse_mode":"HTML"}}]'
utilities.answer_inline_query(inline_query, results, 0) utilities.answer_inline_query(inline_query, results, 0)
end end

View File

@ -27,7 +27,7 @@ function expand:inline_callback(inline_query, config, matches)
description = url description = url
end end
local results = '[{"type":"article","id":"7","title":"'..title..'","description":"'..description..'","url":"'..url..'","thumb_url":"https://anditest.perseus.uberspace.de/inlineQuerys/generic/internet.jpg","thumb_width":165,"thumb_height":150,"hide_url":true,"input_message_content":{"message_text":"'..url..'"}}]' local results = '[{"type":"article","id":"7","title":"'..title..'","description":"'..description..'","url":"'..url..'","thumb_url":"https://brawlbot.tk/inlineQuerys/generic/internet.jpg","thumb_width":165,"thumb_height":150,"hide_url":true,"input_message_content":{"message_text":"'..url..'"}}]'
utilities.answer_inline_query(inline_query, results, 3600) utilities.answer_inline_query(inline_query, results, 3600)
end end

View File

@ -12,12 +12,8 @@ function figuya:get_figuya(figu)
local data = json.decode(b) local data = json.decode(b)
local title = data.title local title = data.title
if string.len(data.description) > 500 then local desc = string.sub(unescape(data.description:gsub("%b<>", "")), 1, 500)..'...'
desc = string.sub(unescape(data.description:gsub("%b<>", "")), 1, 500)..'...' local pic = 'https://brawlbot.tk/img.php?url='..data.thumbnail_url
else
desc = unescape(data.description)..'.'
end
local pic = 'https://anditest.perseus.uberspace.de/img.php?url='..data.thumbnail_url
local text = '<b>'..title..'</b>\n<i>'..desc..'</i>'..'<a href="'..pic..'"> </a>' local text = '<b>'..title..'</b>\n<i>'..desc..'</i>'..'<a href="'..pic..'"> </a>'
return text return text

View File

@ -226,7 +226,7 @@ function forecast:inline_callback(inline_query, config, matches)
if not title and not description and not text and not ttl then abort_inline_query(inline_query) return end if not title and not description and not text and not ttl then abort_inline_query(inline_query) return end
local text = text:gsub('\n', '\\n') local text = text:gsub('\n', '\\n')
local results = '[{"type":"article","id":"28062013","title":"'..title..'","description":"'..description..'","thumb_url":"https://anditest.perseus.uberspace.de/inlineQuerys/weather/cloudy.jpg","thumb_width":80,"thumb_height":80,"input_message_content":{"message_text":"'..text..'", "parse_mode":"Markdown"}}]' local results = '[{"type":"article","id":"28062013","title":"'..title..'","description":"'..description..'","thumb_url":"https://brawlbot.tk/inlineQuerys/weather/cloudy.jpg","thumb_width":80,"thumb_height":80,"input_message_content":{"message_text":"'..text..'", "parse_mode":"Markdown"}}]'
utilities.answer_inline_query(inline_query, results, ttl, is_personal) utilities.answer_inline_query(inline_query, results, ttl, is_personal)
end end

View File

@ -27,7 +27,7 @@ function googl:inline_callback(inline_query, config, matches)
local text, longUrl = googl:send_googl_info(shorturl) local text, longUrl = googl:send_googl_info(shorturl)
if not longUrl then abort_inline_query(inline_query) return end if not longUrl then abort_inline_query(inline_query) return end
local results = '[{"type":"article","id":"9","title":"Verlängerte URL","description":"'..longUrl..'","url":"'..longUrl..'","thumb_url":"https://anditest.perseus.uberspace.de/inlineQuerys/generic/internet.jpg","thumb_width":165,"thumb_height":150,"hide_url":true,"input_message_content":{"message_text":"'..text..'"}}]' local results = '[{"type":"article","id":"9","title":"Verlängerte URL","description":"'..longUrl..'","url":"'..longUrl..'","thumb_url":"https://brawlbot.tk/inlineQuerys/generic/internet.jpg","thumb_width":165,"thumb_height":150,"hide_url":true,"input_message_content":{"message_text":"'..text..'"}}]'
utilities.answer_inline_query(inline_query, results, 1) utilities.answer_inline_query(inline_query, results, 1)
end end

View File

@ -8,7 +8,7 @@ end
hdf.command = 'hdf' hdf.command = 'hdf'
function hdf:action(msg, config) function hdf:action(msg, config)
local HDF_URL = 'https://anditest.perseus.uberspace.de/plugins/hdf' local HDF_URL = 'https://brawlbot.tk/plugins/hdf'
local hdf_pics = { local hdf_pics = {
"/hdf1.jpg", "/hdf1.jpg",
"/hdf2.jpg", "/hdf2.jpg",

View File

@ -28,7 +28,7 @@ function help:inline_callback(inline_query, config, matches)
local doc = doc:gsub('"', '\\"') local doc = doc:gsub('"', '\\"')
local doc = doc:gsub('\\n', '\\\n') local doc = doc:gsub('\\n', '\\\n')
local chosen_plugin = utilities.get_word(plugin.command, 1) local chosen_plugin = utilities.get_word(plugin.command, 1)
local results = '[{"type":"article","id":"9","title":"Hilfe für '..chosen_plugin..'","description":"Hilfe für das Plugin \\"'..chosen_plugin..'\\" wird gepostet.","thumb_url":"https://anditest.perseus.uberspace.de/inlineQuerys/help/hilfe.jpg","input_message_content":{"message_text":"'..doc..'","parse_mode":"Markdown"}}]' local results = '[{"type":"article","id":"9","title":"Hilfe für '..chosen_plugin..'","description":"Hilfe für das Plugin \\"'..chosen_plugin..'\\" wird gepostet.","thumb_url":"https://brawlbot.tk/inlineQuerys/help/hilfe.jpg","input_message_content":{"message_text":"'..doc..'","parse_mode":"Markdown"}}]'
utilities.answer_inline_query(inline_query, results, 600, nil, nil, 'Hilfe anzeigen', 'hilfe_'..chosen_plugin) utilities.answer_inline_query(inline_query, results, 600, nil, nil, 'Hilfe anzeigen', 'hilfe_'..chosen_plugin)
end end
end end

View File

@ -53,7 +53,7 @@ function imdb:inline_callback(inline_query, config, matches)
local description = description:gsub("'", "\'") local description = description:gsub("'", "\'")
if movie_info.Poster == "N/A" then if movie_info.Poster == "N/A" then
img_url = 'https://anditest.perseus.uberspace.de/inlineQuerys/imdb/logo.jpg' img_url = 'https://brawlbot.tk/inlineQuerys/imdb/logo.jpg'
else else
img_url = movie_info.Poster img_url = movie_info.Poster
end end

View File

@ -8,7 +8,7 @@ end
jk.command = 'jk' jk.command = 'jk'
function jk:action(msg, config) function jk:action(msg, config)
local JK_URL = 'https://anditest.perseus.uberspace.de/plugins/jk' local JK_URL = 'https://brawlbot.tk/plugins/jk'
local jk_pics = { local jk_pics = {
"/justkitten1.jpg", "/justkitten1.jpg",
"/justkitten2.jpg", "/justkitten2.jpg",

View File

@ -43,9 +43,9 @@ function nintendo_search:get_info(gametitle)
local release = '\n<b>Release:</b> '..data.pretty_date_s local release = '\n<b>Release:</b> '..data.pretty_date_s
if data.image_url_h2x1_s then if data.image_url_h2x1_s then
image_url = '<a href="http://anditest.perseus.uberspace.de/img.php?url=https:'..data.image_url_h2x1_s..'"> </a>' image_url = '<a href="https://brawlbot.tk/img.php?url=https:'..data.image_url_h2x1_s..'"> </a>'
else else
image_url = '<a href="http://anditest.perseus.uberspace.de/img.php?url=https:'..data.image_url..'"> </a>' image_url = '<a href="https://brawlbot.tk/img.php?url=https:'..data.image_url..'"> </a>'
end end
local text = title..publish..system..image_url..fsk..player..release..link..description local text = title..publish..system..image_url..fsk..player..release..link..description

View File

@ -188,7 +188,7 @@ function plex:inline_callback(inline_query, config, matches)
local text, _, title = plex:get_plex(input) local text, _, title = plex:get_plex(input)
if not text or not title then abort_inline_query(inline_query) return end if not text or not title then abort_inline_query(inline_query) return end
local text = text:gsub('"', '\\"') local text = text:gsub('"', '\\"')
local results = '[{"type":"article","id":"PLEX","title":"'..title..'","thumb_url":"https://anditest.perseus.uberspace.de/inlineQuerys/plex/plex.jpg","thumb_width":150,"thumb_height":150,"input_message_content":{"message_text":"'..text..'","parse_mode":"HTML"}}]' local results = '[{"type":"article","id":"PLEX","title":"'..title..'","thumb_url":"https://brawlbot.tk/inlineQuerys/plex/plex.jpg","thumb_width":150,"thumb_height":150,"input_message_content":{"message_text":"'..text..'","parse_mode":"HTML"}}]'
utilities.answer_inline_query(inline_query, results, 3600) utilities.answer_inline_query(inline_query, results, 3600)
end end

View File

@ -50,7 +50,7 @@ function preview:inline_callback(inline_query, config, matches)
width = data.thumbnail_width width = data.thumbnail_width
height = data.thumbnail_height height = data.thumbnail_height
else else
thumb = 'https://anditest.perseus.uberspace.de/inlineQuerys/generic/internet.jpg' thumb = 'https://brawlbot.tk/inlineQuerys/generic/internet.jpg'
width = 150 width = 150
height = 150 height = 150
end end

View File

@ -43,7 +43,7 @@ end
function respond:action(msg, config, matches) function respond:action(msg, config, matches)
local user_name = get_name(msg) local user_name = get_name(msg)
local receiver = msg.chat.id local receiver = msg.chat.id
local BASE_URL = 'https://anditest.perseus.uberspace.de/plugins/respond' local BASE_URL = 'https://brawlbot.tk/plugins/respond'
if user_name == "DefenderX" then user_name = "Deffu" end if user_name == "DefenderX" then user_name = "Deffu" end
if string.match(msg.text, "[Ll][Oo][Dd]") then if string.match(msg.text, "[Ll][Oo][Dd]") then

View File

@ -40,7 +40,8 @@ special.triggers = {
"^[Pp][Ii][Nn][Gg]$", "^[Pp][Ii][Nn][Gg]$",
"^[Dd][Aa][Ss] [Ii][Ss][Tt]? [Nn][Ii][Cc][Hh][Tt]? [Ll][Uu][Ss][Tt][Ii][Gg]!?$", "^[Dd][Aa][Ss] [Ii][Ss][Tt]? [Nn][Ii][Cc][Hh][Tt]? [Ll][Uu][Ss][Tt][Ii][Gg]!?$",
"/[Bb][Ll][Uu][Ee][Tt][Ee][Xx][Tt]", "/[Bb][Ll][Uu][Ee][Tt][Ee][Xx][Tt]",
"/[Ll][Mm][Gg][Tt][Ff][Yy] (.*)" "/[Ll][Mm][Gg][Tt][Ff][Yy] (.*)",
"/[Ff][Oo][Rr][Tt][Uu][Nn][Ee]"
} }
@ -154,6 +155,8 @@ MUST CLICK
I AM A STUPID ANIMAL THAT IS ATTRACTED TO COLORS]] I AM A STUPID ANIMAL THAT IS ATTRACTED TO COLORS]]
elseif msg_text:match("/[Ll][Mm][Gg][Tt][Ff][Yy]") then elseif msg_text:match("/[Ll][Mm][Gg][Tt][Ff][Yy]") then
utilities.send_reply(msg, '<a href="https://lmgtfy.com/?q='..URL.escape(matches[1])..'">Deine Antwort findest du hier.</a> ;)', 'HTML') utilities.send_reply(msg, '<a href="https://lmgtfy.com/?q='..URL.escape(matches[1])..'">Deine Antwort findest du hier.</a> ;)', 'HTML')
elseif msg_text:match("[Ff][Oo][Rr][Tt][Uu][Nn][Ee]") then
output = run_command("fortune")
end end
utilities.send_reply(msg, output) utilities.send_reply(msg, output)

View File

@ -55,7 +55,7 @@ function tagesschau:inline_callback(inline_query, config, matches)
end end
local text = text:gsub('\n', '\\n') local text = text:gsub('\n', '\\n')
local results = '[{"type":"article","id":"11","title":"'..headline..'","description":"'..shorttext..'","url":"'..full_url..'","thumb_url":"https://anditest.perseus.uberspace.de/inlineQuerys/tagesschau/tagesschau.jpg","thumb_width":150,"thumb_height":150,"hide_url":true,"reply_markup":{"inline_keyboard":[[{"text":"Artikel aufrufen","url":"'..full_url..'"}]]},"input_message_content":{"message_text":"'..text..'","parse_mode":"HTML"}}]' local results = '[{"type":"article","id":"11","title":"'..headline..'","description":"'..shorttext..'","url":"'..full_url..'","thumb_url":"https://brawlbot.tk/inlineQuerys/tagesschau/tagesschau.jpg","thumb_width":150,"thumb_height":150,"hide_url":true,"reply_markup":{"inline_keyboard":[[{"text":"Artikel aufrufen","url":"'..full_url..'"}]]},"input_message_content":{"message_text":"'..text..'","parse_mode":"HTML"}}]'
utilities.answer_inline_query(inline_query, results, 7200) utilities.answer_inline_query(inline_query, results, 7200)
end end

View File

@ -79,13 +79,13 @@ function time:inline_callback(inline_query, config, matches)
if matches[1] == 'time' then if matches[1] == 'time' then
local desc_time = os.date("%A, %d. %B %Y, %H:%M:%S Uhr") local desc_time = os.date("%A, %d. %B %Y, %H:%M:%S Uhr")
local cur_time = time:localize(os.date("%A, %d. %B %Y, *%H:%M:%S Uhr*")) local cur_time = time:localize(os.date("%A, %d. %B %Y, *%H:%M:%S Uhr*"))
results = '[{"type":"article","id":"12","title":"Europa/Berlin","description":"'..desc_time..'","thumb_url":"https://anditest.perseus.uberspace.de/inlineQuerys/time/clock.jpg","input_message_content":{"message_text":"'..cur_time..'","parse_mode":"Markdown"}}]' results = '[{"type":"article","id":"12","title":"Europa/Berlin","description":"'..desc_time..'","thumb_url":"https://brawlbot.tk/inlineQuerys/time/clock.jpg","input_message_content":{"message_text":"'..cur_time..'","parse_mode":"Markdown"}}]'
else else
local coords = utilities.get_coords(matches[1], config) local coords = utilities.get_coords(matches[1], config)
if type(coords) == 'string' then abort_inline_query(inline_query) return end if type(coords) == 'string' then abort_inline_query(inline_query) return end
local output, place, desc_time = time:get_time(coords) local output, place, desc_time = time:get_time(coords)
if not output then abort_inline_query(inline_query) return end if not output then abort_inline_query(inline_query) return end
results = '[{"type":"article","id":"13","title":"'..place..'","description":"'..desc_time..'","thumb_url":"https://anditest.perseus.uberspace.de/inlineQuerys/time/clock.jpg","input_message_content":{"message_text":"'..output..'","parse_mode":"Markdown"}}]' results = '[{"type":"article","id":"13","title":"'..place..'","description":"'..desc_time..'","thumb_url":"https://brawlbot.tk/inlineQuerys/time/clock.jpg","input_message_content":{"message_text":"'..output..'","parse_mode":"Markdown"}}]'
end end
utilities.answer_inline_query(inline_query, results, 1) utilities.answer_inline_query(inline_query, results, 1)
end end

View File

@ -173,7 +173,7 @@ function weather:inline_callback(inline_query, config, matches)
if not title and not description and not icon and not text and not ttl then abort_inline_query(inline_query) return end if not title and not description and not icon and not text and not ttl then abort_inline_query(inline_query) return end
local text = text:gsub('\n', '\\n') local text = text:gsub('\n', '\\n')
local thumb_url = 'https://anditest.perseus.uberspace.de/inlineQuerys/weather/' local thumb_url = 'https://brawlbot.tk/inlineQuerys/weather/'
if icon == 'clear-day' or icon == 'partly-cloudy-day' then if icon == 'clear-day' or icon == 'partly-cloudy-day' then
thumb_url = thumb_url..'day.jpg' thumb_url = thumb_url..'day.jpg'
elseif icon == 'clear-night' then elseif icon == 'clear-night' then

View File

@ -194,7 +194,7 @@ function wikipedia:inline_callback(inline_query, config, matches)
for num in pairs(data.search) do for num in pairs(data.search) do
local title, result, keyboard = wikipedia:wikintro(data.search[num].title, lang, true) local title, result, keyboard = wikipedia:wikintro(data.search[num].title, lang, true)
if not title or not result or not keyboard then abort_inline_query(inline_query) return end if not title or not result or not keyboard then abort_inline_query(inline_query) return end
results = results..'{"type":"article","id":"'..id..'","title":"'..title..'","description":"'..wikipedia:snip_snippet(data.search[num].snippet)..'","url":"https://'..lang..'.wikipedia.org/wiki/'..URL.escape(title)..'","hide_url":true,"thumb_url":"https://anditest.perseus.uberspace.de/inlineQuerys/wiki/logo.jpg","thumb_width":95,"thumb_height":86,"reply_markup":'..keyboard..',"input_message_content":{"message_text":"'..result..'","parse_mode":"HTML"}}' results = results..'{"type":"article","id":"'..id..'","title":"'..title..'","description":"'..wikipedia:snip_snippet(data.search[num].snippet)..'","url":"https://'..lang..'.wikipedia.org/wiki/'..URL.escape(title)..'","hide_url":true,"thumb_url":"https://brawlbot.tk/inlineQuerys/wiki/logo.jpg","thumb_width":95,"thumb_height":86,"reply_markup":'..keyboard..',"input_message_content":{"message_text":"'..result..'","parse_mode":"HTML"}}'
id = id+1 id = id+1
if num < #data.search then if num < #data.search then
results = results..',' results = results..','