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
| {exec;libmod.t} | |
| {if;{flag;_};==;; | |
| {exec;Err;You have to tell me who to warn!} | |
| {return}} | |
| {//;Set the user.} | |
| {suppresslookup} | |
| {if;{exec;usercheck;{userid;{flag;_}}};==;false; | |
| {exec;Err;User not found in {guildname}!} | |
| {return}; | |
| {set;!~user;{userid;{flag;_}}}} |
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
| {exec;libmod.t} | |
| {if;{flag;_};==;{null}; | |
| {exec;Err;You have to tell me who to pardon!} | |
| {return}} | |
| {//;Set the user.} | |
| {suppresslookup} | |
| {set;~user;{userid;{flag;_}}} | |
| {if;{get;~user};==;{null}; | |
| {exec;Err;'{flag;_}' is not a valid Discord user.} | |
| {return}} |
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
| {//;Customizable replacement for blargbot's built in modlogs} | |
| {//;This tag is meant to be saved as a cc} | |
| {//;Save the the 'editlog' tag as a cc to edit modlogs created by this tag} | |
| {//;Initial setup} | |
| {//;Set role to be able to edit/delete any modlog} | |
| {if;{flagset;A};{if;{isstaff}; | |
| {set;_modlog.admin.role;{roleid;{flag;A}}} | |
| {embed;{embedbuild; | |
| description:Admin role for `{commandname}` set to <@&{get;_modlog.admin.role}>!}}{return}; | |
| You must be staff in order to set the modlog admin role!{return}}} |
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
| {exec;searchmsg;Searching Bulbapedia for `{flag;_}`...} | |
| {if;{logic;&&; | |
| {bool;{numformat;{flag;_};};!=;NaN}; | |
| {bool;{length;{flag;_}};==;3}}; | |
| {//;{set;!~poke;{jget;{split;{jget;{split;{exec;rawhtml;{uriencode;https://bulbapedia.bulbagarden.net/w/api.php?action=parse&page=List_of_Pok%C3%A9mon_by_National_Pok%C3%A9dex_number&prop=wikitext}};{flag;_}|{flag;_}|};1};|};0}}} | |
| {set;!~poke;{jget;{exec;grep;-Po '{flag;_}\|\K.*';{get;@pokedex2}};0}} | |
| {set;!~pq;{join;{split;{get;~poke};{space}};_}_}; | |
| {set;!~poke;{jget;{exec;grep;-Pio '.*\|\K{flag;_}';{get;@pokedex2}};0}} | |
| {set;!~pq;{join;{split;{get;~poke};{space}};_}_}} | |
| {set;!~url;{exec;redirect;https://bulbapedia.bulbagarden.net/w/index.php?search={get;~pq}%28Pok%C3%A9mon%29}} |
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
| {if;{args};==;;{throw;Missing expression to evaluate}{return}}{fallback;Failed to evaluate expression}{replace;{jget;{request;http://api.mathjs.org/v4/?expr={uriencode;{regexreplace;{regexreplace;{args};/\s*F($|\s)/i;{space}degF{space}};/\s*C($|\s)/i;{space}degC{space}}}&precision=10};body};{space}deg;{space}°} |
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
| {set;!~usrclrrole;{jget;{filter;~usrclrf;{roles;{userid;{flag;_};quiet};quiet};{bool;{rolecolor;{get;~usrclrf}};!=;000000}};0}}{if;{get;~usrclrrole};!=;;{rolecolor;{get;~usrclrrole};quiet};{exec;blurple}} |
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
| {if;{numformat;{flag;_};};!=;NaN; | |
| {if;{jget;{messageattachments;{flag;_}};0};!=;{null}; | |
| {set;!~raw;{request;{jget;{messageattachments;{flag;_}};0}}} | |
| {set;!~name;{regexreplace;{reverse;{jget;{split;{reverse;{jget;{messageattachments;{flag;_}};0}};/};0}};/\./g;%%%}}; | |
| {jset;~raw;body;{replace;{jget;{split;{messagetext;{flag;_}};{repeat;`;3}};1};{newline};};c} | |
| {commit} | |
| {jset;~raw;contentType;text/plain;c} | |
| {commit} | |
| {set;!~name;{regexreplace;{jget;{split;{messagetext;{flag;_}};{space}};4};/\./g;%%%}%%%bbtag}}; | |
| {set;!~raw;{request;{flag;_}}} |
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
| {fallback;} | |
| {set;!~news;{htmldecode;{jget;{split;{base64decode;{jget;{request;https://archlinux.org/feeds/news/};body}};<title>};2}}} | |
| {set;!~url;{jget;{split;{jget;{split;{get;~news};<link>};1};</link>};0}} | |
| {if;{get;~url};!=;; | |
| {if;{get;~url};!=;{get;_last.arch.news}; | |
| {set;!_last.arch.news;{get;~url}} | |
| {set;!~title;{jget;{split;{get;~news};</title>};0}} | |
| {if;{lower;{get;~title}};includes;intervention;{rolesetmentionable;{roleid;{args;2}};true;quiet}} | |
| {set;!~url;{jget;{split;{jget;{split;{get;~news};<link>};1};</link>};0}} | |
| {set;!~desc;{regexreplace;{regexreplace;{jget;{split;{jget;{split;{get;~news};<description>};1};</description>};0};/<\/?code>/g;`};/<[^>]*>/g;}} |
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
| {//;~~function to check if required roles are set~~} | |
| {function;checkmutedrole;{if;{get;_libmod.role.muted};==;; | |
| {if;{isstaff;{userid}};{set;~nomute.msg;{output;{embed;{embedbuild; | |
| title:No 'muted' role set; | |
| color:red; | |
| description:Please enter the role name or ID to give users when muting them.}}}} | |
| {fallback;} | |
| {set;~nomute.rsp;{waitmessage;{channelid};{userid};{bool;{roles};includes;{messagetext}};60}} | |
| {if;{get;~nomute.rsp};==;;{edit;{channelid};{get;~nomute.msg};;{embedbuild; | |
| title:No valid role entered; |
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
| {//;'autoslowmode' enables slowmode if more than '{get;_autoslow.{get;~slowchanid}.max.msgs}' messages are sent in '{get;_autoslow.{get;~slowchanid}.max.time}' seconds (defaults to 5 messages in 5 seconds)} | |
| {//;this tag is meant to be used in an everything autoresponse} | |
| {set;!~slowchanid;{channelid}} | |
| {//;set max time and msgs variables} | |
| {if;{get;_autoslow.{get;~slowchanid}.ranonce};!=;true; | |
| {set;!_autoslow.{get;~slowchanid}.ranonce;true} | |
| {set;!_autoslow.{get;~slowchanid}.max.msgs;5} | |
| {set;!_autoslow.{get;~slowchanid}.max.time;5} | |
| {set;!_autoslow.{get;~slowchanid}.timer;120} | |
| {set;!_autoslow.{get;~slowchanid}.seconds;10}} |