Skip to content

Instantly share code, notes, and snippets.

@DiscordLinuxBot
DiscordLinuxBot / searcher.bbtag
Last active January 10, 2021 05:29
searcher.bbtag
{exec;prefix.test}
{function;help;{embed;{embedbuild;
title:Help for {exec;commandname;se};
color:yellow;
description:**__Usage:__** `{exec;commandname;se} [arg] <search term>`
Search the web using Qwant/Google/DDG (whichever is working <:haHAA:459575055291121664>) or use one of the arguments listed below to perform a specific search.
If none of the arguments below are used, a normal search will be ran.
**Available arguments**:
```
{set;~zypmsg;{output;{embed;{embedbuild;
color:{exec;distrocolors;opensuse};
thumbnail.url:{exec;linuxhacker};
description:Searching openSUSE Build Service for '{flag;_}'...;}}}}
{set;~request;{exec;motyar;https://zyp_user:zyp_password_1@api.opensuse.org/search/published/binary/id?match=%40name%3D%27{if;{flag;_};==;;zyp;{uriencode;{flag;_}}}%27;-x /collection/binary[@project=%22openSUSE:Factory%22]}}
{if;{jget;{get;~request};body};==;null;{set;~request;{exec;motyar;https://zyp_user:zyp_password_1@api.opensuse.org/search/published/binary/id?match=%40name%3D%27{if;{flag;_};==;;zyp;{uriencode;{flag;_}}}%27;-x /collection/binary[@repository=%22openSUSE_Factory%22]}}}
{if;{jget;{get;~request};body};==;null;{set;~request;{exec;motyar;https://zyp_user:zyp_password_1@api.opensuse.org/search/published/binary/id?match=%40name%3D%27{if;{flag;_};==;;zyp;{uriencode;{flag;_}}}%27;-x /collection/binary[@repository=%22openSUSE_Tumbleweed%22]}}}
{set;~pkg;{jget;{get;~request};body.0}}
{if;{get;~pkg};startswith;`;{edit;{channe
@DiscordLinuxBot
DiscordLinuxBot / infolist.bbtag
Last active January 10, 2021 03:25
infolist.bbtag
{exec;prefix.test}
{if;{get;_{commandname}.categories};==;;{set;_{commandname}.categories;[]}}
{if;{get;_{commandname}.help};==;;{set;_{commandname}.help;}}
{if;{flag;C};==;;
{set;~commandname;{commandname}};
{set;~commandname;{flag;C}}}
{function;buildhelp;
{if;{length;{get;_{get;~commandname}.categories}};>;0;{foreach;~category;{sort;{jget;{get;_{get;~commandname}.categories};v}};• __**{get;~category}**__{newline}{repeat;`;3}{newline}{uridecode;{join;{sort;{jget;{get;_{get;~commandname}.categories.{get;~category}};v}};,{space}}}{newline}{repeat;`;3}{newline}}}{if;{isstaff;{userid}};**Arguments**{newline}`sethelp` - Set static help that will prefix the built in help output.{newline}`help` - Get the currently set help.{newline}`addinfo <category> -n <name> -e <info>` - Add a new info type. Prefix the info with `exec` to have it execute a tag when called, or `execcc` for a cc.{newline}`delinfo <category> -n <name>` - Remove an info type.}}
{embed;{embedbuild;
author.name:Arch Linux;
author.icon_url:https://cdn.discordapp.com/emojis/230467805240098816.png?v=1;
author.url:https://archlinux.org;
color:{exec;distrocolors;arch};
description:Arch is an independent distro built with a base install that users can customize to meet their needs. It is rolling-release, which means that new versions of applications become available as they are released by the developers. It also offers access to unsupported software in the community-maintained Arch User Repository (AUR).;
fields.name:<:SeemsGood:478441196755091461> Advantages of Arch Linux;
fields.value:• Because of the install process, you know exactly what packages you have and how the distro works.
• Software is generally newer than point release distros.
• If a package is not available in the regular repos, the chance that it is in the AUR is fairly high.
{switch;{lower;{flag;_}};
["verify","sums","check","iso"];{exec;ubuntu-verify};
["based"];{exec;ubuntu-based};
{embed;{embedbuild;
author.name:Ubuntu;
author.icon_url:https://assets.ubuntu.com/v1/29985a98-ubuntu-logo32.png;
author.url:https://ubuntu.com;
color:{exec;distrocolors;ubuntu};
footer.text:See 'sudo info xubuntu', 'sudo info ubuntu mate', 'sudo info lubuntu', and 'sudo info ubuntu budgie' for more information about Ubuntu flavors.;
footer.icon_url:https://cdn.discordapp.com/emojis/230469242183483392.png?v=1;
{exec;hahaboom}
{embed;{embedbuild;
author.name:Xubuntu;
author.icon_url:https://upload.wikimedia.org/wikipedia/commons/thumb/a/af/Xubuntu_logo.svg/1024px-Xubuntu_logo.svg.png;
author.url:https://xubuntu.org;
color:0044AA;
footer.text:See 'sudo info ubuntu' for more information about Ubuntu.;
footer.icon_url:https://cdn.discordapp.com/emojis/230469242183483392.png?v=1;
description:Xubuntu is an [official Ubuntu flavor](https://ubuntu.com/download/flavours) that uses the [Xfce Desktop Environment](https://en.wikipedia.org/wiki/Xfce). It is often considered to be the most stable Ubuntu flavor. As is the case with all [official Ubuntu flavors](https://ubuntu.com/download/flavours), Xubuntu has access to all of the packages in Ubuntu's repositories and can use PPAs created for Ubuntu.
**[Screenshots of Xubuntu](https://xubuntu.org/screenshots/)**;
{embed;{embedbuild;
author.name:Lubuntu;
author.icon_url:https://cdn.discordapp.com/emojis/230468300784533524.png?v=1;
author.url:https://lubuntu.me;
color:0169C8;
footer.text:See 'sudo info ubuntu' for more information about Ubuntu.;
footer.icon_url:https://cdn.discordapp.com/emojis/230469242183483392.png?v=1;
description:Lubuntu is an [official Ubuntu flavor](https://ubuntu.com/download/flavours) that uses the [LXQt Desktop Environment](https://en.wikipedia.org/wiki/LXQt). As is the case with all [official Ubuntu flavors](https://ubuntu.com/download/flavours), Lubuntu has access to all of the packages in Ubuntu's repositories and can use PPAs created for Ubuntu.
**[Screenshot of Lubuntu](https://i.imgur.com/Vl9QYVX.png)**;
fields.name:<:SeemsGood:478441196755091461> Advantages of Lubuntu;
@DiscordLinuxBot
DiscordLinuxBot / interval.bbtag
Last active April 10, 2021 22:55
interval.bbtag
{fallback;}
{//;...............#}
{//;Pardon everyone who has warnings on the first of every month at 0000 CST}
{if;{substring;{time;DDHHmm;;;America/Chicago};0;5};==;01000;
{set;!~pardon.array;{filter;~fpusr;{guildmembers};{if;0{warnings;{get;~fpusr}};>;0;true;false}}}
{set;!~pardon.names.array;[]}
{if;{length;{get;~pardon.array}};>;0;
{set;!~message.sent;true}
{foreach;~pusr;{get;~pardon.array};
{push;~pardon.names.array;{usernick;{get;~pusr}}: {warnings;{get;~pusr}}}
@DiscordLinuxBot
DiscordLinuxBot / autoresponse_1.bbtag
Created May 24, 2020 06:02
autoresponse_1.bbtag
{switch;{channelid};
["488558732893093929"];
{//;## execute _give.tty command for messages from FormBot}
{if;{username};==;FormBot;
{execcc;_give.tty;{messagetext}}
{return}};
["529058523682701333"];
{//;## track issues submitted to #github-requests}
{if;{jget;{messageembeds;{channelid};{messageid}};0.title};includes;Issue opened:;
{if;{get;_github.requests};==;;
{//;help function}
{function;twitchhelp;{embed;{embedbuild;
color:6441A4;
author.name:Twitch.tv;
author.url:https://twitch.tv;
author.icon_url:https://assets.help.twitch.tv/Glitch_Purple_RGB.png;
title:Help for {exec;commandname;twitch};
description:Gets the status of a Twitch streamer.;}}}
{//;function to get stream info from twitch api}
{function;twitchapi;