Created
May 24, 2020 05:44
-
-
Save DiscordLinuxBot/7da3c4df5a04c7f18a0b651e87635572 to your computer and use it in GitHub Desktop.
protonsend.bbtag
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{switch;{lower;{args;0}}; | |
["appid"];{set;!~id;{args;1}}; | |
{set;!~gamewiki;{request;https://www.pcgamingwiki.com/w/api.php?action=query&format=json&prop=categories%7Cextlinks%7Cinfo&list=&meta=&generator=search&redirects=1&converttitles=1&utf8=1&formatversion=2&clcategories=Category%3ALinux%7CCategory%3AWindows%7CCategory%3AOS%20X&elprotocol=https&elquery=steamdb.info&elexpandurl=1&inprop=url%7Cdisplaytitle&gsrsearch={uriencode;{args}}&gsrwhat=nearmatch}} | |
{fallback;} | |
{set;!~id;{jget;{split;{jget;~gamewiki;body.query.pages.0.extlinks.0.url};/};4}}} | |
{if;{get;~id};==;{null};{embedbuild; | |
color:red; | |
description:'{flag;_}' not found.}; | |
{set;!~steam;{jget;{request;https://steamspy.com/api.php?request=appdetails&appid={get;~id}};body}} | |
{set;!~pjson;{request;https://www.protondb.com/api/v1/reports/summaries/{get;~id}.json}} | |
{set;!~steamjson;{request;http://store.steampowered.com/api/appdetails?appids={get;~id}}} | |
{//;{set;!~desc;{exec;metadata;https://store.steampowered.com/app/{get;~id}}}} | |
{set;!~desc;{substring;{htmldecode;{htmldecode;{regexreplace;{regexreplace;{regexreplace;{exec;html2markdown;{uridecode;{jget;~steamjson;body.{get;~id}.data.detailed_description}}};/\n/g;{space}};/(!\[\]|\([^\)]*\))/g;};/\s-\s/g;{newline}-{space}}}};0;300}} | |
{//;{set;!~desc;{jget;~steamjson;body.{get;~id}.data.short_description}}} | |
{set;!~platforms;[]} | |
{if;{jget;~steamjson;body.{get;~id}.data.platforms.windows};==;true; | |
{push;~platforms;Windows} | |
{commit}} | |
{if;{jget;~steamjson;body.{get;~id}.data.platforms.mac};==;true; | |
{push;~platforms;macOS} | |
{commit}} | |
{if;{jget;~steamjson;body.{get;~id}.data.platforms.linux};==;true; | |
{push;~platforms;Linux} | |
{commit}} | |
{set;!~platforms;{join;{get;~platforms};,{space}}} | |
{if;{get;~platforms};==;{null}; | |
{set;!~platforms;Windows}} | |
{fallback;0} | |
{set;!~cplayers;{jget;{exec;motyar;https://steamcharts.com/app/{get;~id};-x //*[@id="app-heading"]/div[1]/span};body.0.text}} | |
{fallback;} | |
{embedbuild; | |
author.name:ProtonDB.com · {jget;~steam;name} · AppID: {get;~id}; | |
author.icon_url:https://cdn.discordapp.com/icons/481706387278397440/f55e7ab1b69de54145c09803d49dbe51.webp; | |
author.url:https://www.protondb.com/app/{get;~id}; | |
color:1B2838; | |
thumbnail.url:https://steamcdn-a.akamaihd.net/steam/apps/{get;~id}/header.jpg; | |
description:__**[Summary of ProtonDB ratings](https://www.protondb.com/app/{get;~id})**__ | |
{if;{jget;~pjson;body.confidence};==;;No ratings found.;**Confidence**: {jget;~pjson;body.confidence} | |
**Score**: {jget;~pjson;body.score} | |
**Tier**: {jget;~pjson;body.tier} | |
**Total Ratings**: {jget;~pjson;body.total} | |
**Trending Tier**: {jget;~pjson;body.trendingTier} | |
**Best Reported Tier**: {jget;~pjson;body.bestReportedTier}} | |
__**[Steam Store Page](https://store.steampowered.com/app/{get;~id})**__ | |
**Description**: {get;~desc}{if;{length;{get;~desc}};>=;300;{space}[...]} | |
**Operating System**: {get;~platforms} | |
**Developer**: {jget;~steam;developer} | |
**Publisher**: {jget;~steam;publisher} | |
**Genre**: {regexreplace;{jget;~steam;genre};/,/g;,{space}} | |
**Tags**: {regexreplace;{regexreplace;{regexreplace;{replace;{replace;{jget;~steam;tags};{rb};};{lb};};/"/g;};/:[0-9][0-9]?[0-9]?[0-9]?[0-9]?,/g;,{space}};/:[0-9][0-9]?[0-9]?[0-9]?$/;} | |
**Price**: {math;/;{jget;~steam;price};100} USD {if;{jget;~steam;discount};!=;0;({jget;~steam;discount}% discount)} | |
**Steam Ratings**: {jget;~steam;positive} positive, {jget;~steam;negative} negative | |
**Current Players**: {get;~cplayers} | |
*https://www.protondb.com/app/{get;~id}*}} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment