AppStore Plugin: Bild als Thumbnail
Brawlbot Commit:
f5085151eb (diff-74d2e3c42166db7c9efc5e50e56b3326)
This commit is contained in:
parent
ebb702cefa
commit
f81e1fe9c2
@ -67,12 +67,6 @@ function app_store:send_appstore_data(data)
|
|||||||
ratings = ""
|
ratings = ""
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
local header = '<b>'..name..'</b> v'..version..' von <b>'..author..'</b> ('..price..'):'
|
|
||||||
local body = '\n'..description..'\n<i>Benötigt mind. iOS '..min_ios_ver..'</i>\nGröße: '..size..' MB\nErstveröffentlicht am '..release..game_center..category
|
|
||||||
local footer = '\n'..avg_rating..ratings
|
|
||||||
local text = header..body..footer
|
|
||||||
|
|
||||||
-- Picture
|
-- Picture
|
||||||
if data.screenshotUrls[1] and data.ipadScreenshotUrls[1] then
|
if data.screenshotUrls[1] and data.ipadScreenshotUrls[1] then
|
||||||
image_url = data.screenshotUrls[1]
|
image_url = data.screenshotUrls[1]
|
||||||
@ -84,7 +78,16 @@ function app_store:send_appstore_data(data)
|
|||||||
image_url = nil
|
image_url = nil
|
||||||
end
|
end
|
||||||
|
|
||||||
return text, image_url
|
if image_url then
|
||||||
|
header = '<b>'..name..'</b> v'..version..' von <b>'..author..'</b> ('..price..'):<a href="'..image_url..'"> </a>'
|
||||||
|
else
|
||||||
|
header = '<b>'..name..'</b> v'..version..' von <b>'..author..'</b> ('..price..'):'
|
||||||
|
end
|
||||||
|
local body = '\n'..description..'\n<i>Benötigt mind. iOS '..min_ios_ver..'</i>\nGröße: '..size..' MB\nErstveröffentlicht am '..release..game_center..category
|
||||||
|
local footer = '\n'..avg_rating..ratings
|
||||||
|
local text = header..body..footer
|
||||||
|
|
||||||
|
return text
|
||||||
end
|
end
|
||||||
|
|
||||||
function app_store:action(msg, config, matches)
|
function app_store:action(msg, config, matches)
|
||||||
@ -99,13 +102,9 @@ function app_store:action(msg, config, matches)
|
|||||||
utilities.send_reply(msg, '<b>App nicht gefunden!</b>', 'HTML')
|
utilities.send_reply(msg, '<b>App nicht gefunden!</b>', 'HTML')
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
local output, image_url = app_store:send_appstore_data(data)
|
local output = app_store:send_appstore_data(data)
|
||||||
utilities.send_reply(msg, output, 'HTML')
|
utilities.send_message(msg.chat.id, output, false, msg.message_id, 'HTML')
|
||||||
if image_url then
|
|
||||||
utilities.send_typing(msg.chat.id, 'upload_photo')
|
|
||||||
utilities.send_photo(msg.chat.id, image_url, nil, msg.message_id)
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return app_store
|
return app_store
|
Reference in New Issue
Block a user