menu

blargbot is equipped with a system of tags called BBTag, designed to mimic a programming language while still remaining simple. You can use this system as the building-blocks to create your own advanced command system, whether it be through public tags or guild-specific custom commands.

Have a suggestion for a tag? I'm all ears! Drop me a suggestion using b!suggest or come by my guild to talk to me in person.

Editor

There is also an online BBTag IDE (in beta) that you can use to see the contents of your custom command a little bit easier. Feel free to give it a try!

Features

Variables

BBTag features four different types of variables, each with a different scope. These types are distinguished from each other with prefixes.

Arrays

BBTag has array implementation for more complex data stuctures.

Simple Tags

These tags are just simple replaces, and don't take any arguments.

argslength

Return the number of arguments the user provided.

Example Input:
You said {argslength} words.
Example Output:
Input: I am saying things.
Output: You said 4 words.

channelid

Returns the ID of the current channel

Example Input:
This channel's id is {channelid}
Example Output:
This channel's id is 1234567890123456

channelname

Returns the name of the current channel

Example Input:
This channel's name is #{channelname}
Example Output:
This channel's name is #test-channel

channelpos

Returns the position of the current channel

Example Input:
This channel is in position {channelpos}
Example Output:
This channel is in position 1

commandname

Gets the name of the current tag or custom command. Will throw an error in other instances.

Example Input:
This command is {commandname}
Example Output:
This command is test

guildicon

Returns the icon of the current guild

Example Input:
The guild's icon is {guildicon}
Example Output:
The guild's icon is (icon url)

guildid

Returns the id of the current guild

Example Input:
This guild's id is {guildid}
Example Output:
This guild's id is 1234567890123456

guildmembers

Returns the number of members on the current guild

Example Input:
This guild has {guildmembers} members.
Example Output:
This guild has 123 members.

guildname

Returns the name of the current guild

Example Input:
This guild's name is {guildname}
Example Output:
This guild's name is TestGuild

guildownerid

Returns the id of the guild's owner

Example Input:
The owner's id is {guildownerid}
Example Output:
The owner's id is 1234567890123456

lb

Will be replaced by { on execution.

Example Input:
This is a bracket! {lb}
Example Output:
This is a bracket! {

messageid

Returns the ID of the invoking message.

Example Input:
The message id was {messageid}
Example Output:
The message id was 111111111111111111

nsfw

Marks the message is being NSFW, and only to be outputted in NSFW channels. A requirement for any tag with NSFW content.

Example Input:
This command is not safe! {nsfw}
Example Output:
This command is not safe!

prefix

Gets the current guild's prefix.

Example Input:
Your prefix is {prefix}
Example Output:
Your prefix is b!

randuser

Returns the id of a random user on the current guild.

Example Input:
{username;{randuser}} is a lovely person! {username;{randuser}} isn't as good.
Example Output:
abalabahaha is a lovely person! stupid cat isn't as good.

rb

Will be replaced by } on execution.

Example Input:
This is a bracket! {rb}
Example Output:
This is a bracket! }

return

Stops execution of the tag and returns what has been parsed.

Example Input:
This will display. {return} This will not.
Example Output:
This will display.

semi

Will be replaced by ; on execution.

Example Input:
This is a semicolon! {semi}
Example Output:
This is a semicolon! ;

Complex

These tags are more powerful.
<> - denotes required arguments
[] - denotes optional arguments
... - denotes one or more arguments

General

General purpose functions.

//

Arguments: Anything

A tag that just gets removed. Useful for documenting your code.

Example Input:
This is a sentence. {//;This is a comment.}
Example Output:
This is a sentence.

abs

Arguments: <number>

Gets the absolute value of a number

Example Input:
{abs;-535}
Example Output:
535

aget

Arguments: <name> [index]

Returns a stored variable, or an index in a stored array. Variables are unique per-author.

Example Input:
{aget;testvar}
Example Output:
This is a test var

args

Arguments: [index] [range]

Gets user input. Specifying an index will only get the word at that location, specifying a range will get all the words between index and range. Specify range as n to get all the words from index to the end

Example Input:
Your second word was {args;1}
Example Output:
Input: Hello world!
Output: Your second word was world!

aset

Arguments: <name> <value>

Stores a variable. These variables are saved between sessions, and are unique per-author.

Example Input:
{aset;testvar;This is a test var}
Example Output:

base

Arguments: <integer> [origin] <radix>

Converts a Base origin number into radix. Default origin is 10. radix must be between 2 and 36.

Example Input:
{base;255;16}
Example Output:
FF

bool

Arguments: <evaluator> <arg1> <arg2>

Evaluates arg1 and arg2 using the evaluator and returns true or false. Valid evaluators are == != < <= > >= startswith endswithincludes

Example Input:
{bool;<=;5;10}
Example Output:
true

brainfuck

Arguments: <code> [input]

Interprets brainfuck input.

Example Input:
{brainfuck;++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.}
Example Output:
Hello World!

capitalize

Arguments: <text> [lower]

Capitalizes the first letter of text. If lower is specified the rest of the text will be lowercase

Example Input:
{capitalize;hello world!}
Example Output:
Hello world!

ceil

Arguments: <number>

Rounds a number up.

Example Input:
{ceil;1.23}
Example Output:
2

choose

Arguments: <choice> <choices...>

Chooses from the given options, where choice is the index of the option selected

Example Input:
I feel like eating {choose;1;cake;pie;pudding} today.
Example Output:
I feel like eating pie today.

decrement

Arguments: <variable name> [amount]

Decreases the value of the specified variable by the specified amount. Defaults to 1

Example Input:
{set;counter;0} {repeat;{decrement;counter},;10}
Example Output:
-1,-2,-3,-4,-5,-6,-7,-8,-9,-10

delete

Arguments: [channelid] [messageid]

Deletes the specified message, defaulting to the message that invoked the command. Only ccommands can delete other messages.

Example Input:
The message that triggered this will be deleted. {delete}
Example Output:
(the message got deleted idk how to do examples for this)

emoji

Arguments: <text> [amount]

Gets amount (or 5 if amount isn't specified) emojis related to the given text. There's a limit of 10 emojis.

Example Input:
{emoji;I am hungry;5}
Example Output:
🍔 🍕 😩 🍴 😐

exec

Arguments: <code> [user input]

Executes another tag. Useful for modules.

Example Input:
Let me do a tag for you. {exec;f}
Example Output:
Let me do a tag for you. User#1111 has paid their respects. Total respects given: 5

fallback

Arguments: <message>

Should any tag fail to parse, it will be replaced with the fallback message instead of an error

Example Input:
{fallback;This tag failed} {randint}
Example Output:
This tag failed

floor

Arguments: <number>

Rounds a number down.

Example Input:
{floor;1.23}
Example Output:
1

get

Arguments: <name> [index]

Returns a stored variable, or an index in a stored array. Variables are unique per-tag.

Example Input:
{get;testvar}
Example Output:
This is a test var

guildcreatedat

Arguments: [format]

Returns the date the current guild was created, in UTC+0. If a format code is specified, the date is formatted accordingly. Leave blank for default formatting. See the moment documentation for more information.

Example Input:
This guild was created on {guildcreatedat;YYYY/MM/DD HH:mm:ss}
Example Output:
This guild was created on 2016/01/01 01:00:00

hash

Arguments: <text>

Returns the numeric hash of any given text, based on the unicode value of each individual character. This results in seemingly randomly generated numbers that are constant for each specific query.

Example Input:
The hash of brown is {hash;brown}
Example Output:
The hash of brown is 94011702

hasrole

Arguments: <roleids> [user]

Checks if a user has a role with the same id as the provided argument, and returns either 'true' or 'false'. roleid can also be an array of role ids. You can find a list of roles and their ids by doing `b!roles`. If a user is provided, check that user.

Example Input:
You are a moderator: {hasrole;moderator}
Example Output:
You are a moderator: false

if

Arguments: <arg1> <evaluator> <arg2> <then> <else>

Evaluates arg1 and arg2 using the evaluator. If it returns true, the tag returns then. Otherwise, it returns else. Valid evaluators are ==!= < <= > >= startswith endswith includes

Example Input:
{if;5;<=;10;5 is less than or equal to 10;5 is greater than 10}
Example Output:
5 is less than or equal to 10

increment

Arguments: <variable name> [amount]

Increases the value of the specified variable by the specified amount. Defaults to 1

Example Input:
{set;counter;0} {repeat;{increment;counter},;10}
Example Output:
1,2,3,4,5,6,7,8,9,10

indexof

Arguments: <text> <searchfor> [start]

Finds the index of searchfor in text, after start. text can either be plain text or an array. If it's not found, returns -1.

Example Input:
The index of 'o' in 'hello world' is {indexof;hello world;o}
Example Output:
The index of 'o' in 'hello world' is 4

inject

Arguments: <code>

Injects code into the tag. For example, doing {inject;{args}} will let any user execute any code. Use with caution.

Example Input:
Random Number: {inject;{lb}randint{semi}1{semi}4{lb}}
Example Output:
Random Number: 3

inrole

Arguments: <roleid>

Returns how many people are in a specific role.

Example Input:
There are {inrole;11111111111111111} people in the role!
Example Output:
There are 5 people in the role!

lang

Arguments: <language>

Specifies the language used to display the raw contents of this tag.

Example Input:
This will be displayed with js! {lang;js}
Example Output:
This will be displayed with js!

length

Arguments: <text>

Gives the amount of characters in text, or the number of elements if it is an array.

Example Input:
What you said is {length;{args}} chars long.
Example Output:
What you said is 5 chars long.

logic

Arguments: <evaluator> <arg1> <arg2>

Accepts 2 boolean values (true or false) and returns the result of a logic operation on them. Valid logic operators are || && XOR !

Example Input:
{logic;&&;true;false}
Example Output:
false

lower

Arguments: <string>

Returns string as lowercase

Example Input:
{lower;THIS WILL BECOME LOWERCASE}
Example Output:
this will become lowercase

math

Arguments: <operator> <operands...>

Returns a number based on the operator and operands. Valid operators are

  • +
  • -
  • *
  • /
  • %
  • ^

Example Input:
2 + 3 + 6 - 2 = {math;-;{math;+;2;3;6};2}
Example Output:
2 + 3 + 6 - 2 = 9

max

Arguments: <number>...

Returns the largest number out of those provided

Example Input:
{max;50;2;65}
Example Output:
65

min

Arguments: <number>...

Returns the smallest number out of those provided

Example Input:
{min;50;2;65}
Example Output:
2

newline

Arguments: [length]

Will be replaced by a specified number of newline characters (\n).

Example Input:
{newline}Hello, world!
Example Output:
Hello, world!

pad

Arguments: <direction> <back> <text>

Pads back to the direction of text

Example Input:
{pad;left;000000;ABC}
Example Output:
000ABC

parsefloat

Arguments: <text>

Returns an floating point number from text. If it wasn't a number, returns NaN

Example Input:
{parsefloat;abcd} {parsefloat;12.34} {parsefloat;1.2cd}
Example Output:
NaN 12.34 1.2

parseint

Arguments: <text>

Returns an integer from text. If it wasn't a number, returns NaN

Example Input:
{parseint;abcd} {parseint;1234} {parseint;12cd}
Example Output:
NaN 1234 12

randchoose

Arguments: <choices...>

Chooses a random choice

Example Input:
I feel like eating {randchoose;cake;pie;pudding} today.
Example Output:
I feel like eating pudding today.

randint

Arguments: [min] <max>

If only max is specified, gets a random number between max and 0. If both arguments are specified, gets a random number between them.

Example Input:
You rolled a {randint;1;6}
Example Output:
You rolled a 5

randstr

Arguments: <chars> <length>

Creates a random string with characters from chars that is length characters long.

Example Input:
{randstr;1234567890;10}
Example Output:
3789327305

realpad

Arguments: <text> <length> [character] [direction]

Pads the provided text to the provided length, using the provided character and direction. Character defaults to space, direction defaults to right.

This is how padding should be implemented, and the {pad} subtag is a sucks. The past me who thought it would be a good idea is also a sucks.

Example Input:
{realpad;ABC;6;0;left}
Example Output:
000ABC

regexreplace

Arguments: [toreplace] <regex> <replacewith>

Replaces the regex phrase with replacewith. If toreplace is specified, the tag is replaced with the new toreplace. If not, it replaces the message.

Example Input:
I like {regexreplace;to consume;/o/gi;a} cheese. {regexreplace;/e/gi;n}
Example Output:
I likn ta cansumn chnnsn.

regextest

Arguments: <query> <regex>

Tests if the regex phrase matches the query, and returns a boolean.

Example Input:
{regextest;apple;/p+/i} {regextest;banana;/p+/i}
Example Output:
true false

repeat

Arguments: <text> <amount>

Repeats text amount times.

Example Input:
{repeat;e;10}
Example Output:
eeeeeeeeee

replace

Arguments: [toreplace] <phrase> <replacewith>

Replaces the phrase with replacewith. If toreplace is specified, the tag is replaced with the new toreplace. If not, it replaces the message.

Example Input:
I like {replace;to eat;eat;nom} cheese. {replace;cheese;ham}
Example Output:
I like to nom ham

reverse

Arguments: <text>

Reverses the order of text or an array. If {get} or {aget} are used with an array, will modify the original array.

Example Input:
{reverse;text}
Example Output:
txet

rolecolor

Arguments: [quiet]

Returns a role's hex color code. If quiet is specified, if a role can't be found it will simply return the name

Example Input:
The admin role color is: #{rolecolor;admin}
Example Output:
The admin role ID is: #1b1b1b

roleid

Arguments: [quiet]

Returns a role's ID. If quiet is specified, if a role can't be found it will simply return the name

Example Input:
The admin role ID is: {roleid;admin}
Example Output:
The admin role ID is: 123456789123456

rolemembers

Arguments: <role> [quiet]

Returns an array of members in the specified role. If quiet is specified, if a role can't be found it will simply return the role

Example Input:
The admins are: {rolemembers;Admin}
Example Output:
The admins are: ["11111111111111111","22222222222222222"]

rolemention

Arguments: [quiet]

Returns a role's mention. If quiet is specified, if a role can't be found it will simply return the name

Example Input:
The admin role mention is: {rolemention;admin}
Example Output:
The admin role mention is: @admin

rolename

Arguments: [quiet]

Returns a role's name. If quiet is specified, if a role can't be found it will simply return the name

Example Input:
The admin role name is: {rolename;admin}
Example Output:
The admin role name is: Administrator

roles

Arguments: [user] [quiet]

Returns an array of roles on the current guild. If user is specified, get the roles that user has. If quiet is specified, if a user can't be found it will simply return the name

Example Input:
The roles on this guild are: {roles}
Example Output:
The roles on this guild are: ["11111111111111111","22222222222222222"]

round

Arguments: <number>

Rounds a number up or down.

Example Input:
{round;1.23}
Example Output:
1

set

Arguments: <name> <value> [value]...

Stores a variable. These variables are saved between sessions, and are unique per-tag. If used in a custom command, they are unique per-guild. If multiple values are specified, an array is created.

Example Input:
{set;testvar;This is a test var}
Example Output:

shuffle

Arguments: [array]

Shuffles the args the user provided, or the provided array.

Example Input:
{shuffle} {args;0} {args;1} {args;2}
Example Output:
Input: one two three
Output: three one two

space

Arguments: [length]

Will be replaced by a specified number of spaces.

Example Input:
{space;4}Hello, world!
Example Output:
Hello, world!

substring

Arguments: <text> <start> [end]

Returns a chunk of text between the start and end indexes. If end is not specified, it assumes the length of the text.

Example Input:
Hello {substring;world;2;3}!
Example Output:
Hello r!

switch

Arguments: <arg> <case1> <then1> [case2] [then2].. [default]

Finds the case that matches arg and returns the following then.If there is no matching case and default is specified,default is returned. If not, it returns blank.

Example Input:
{switch;{args;0};yes;Correct!;no;Incorrect!;That is not yes or no}
Example Output:
Correct!

throw

Arguments: <error>

Throws an error.

Example Input:
{throw;Custom Error}
Example Output:
`Custom Error`

time

Arguments: [format] [time] [parseformat] [timezone]

Returns the current time, in UTC+0. If a format code is specified, the date is formatted accordingly. Leave blank for default formatting. See the moment documentation for more information.
Additionally, you can specify another time to display, and a format to parse it with. See here for parsing documentation. See here for a list of timezone codes.

Example Input:
It's currently {time;YYYY/MM/DD HH:mm:ss}
Example Output:
It's currently 2016/01/01 01:00:00

trim

Arguments: <text>

Trims whitespace and newlines before and after the provided text.

Example Input:
{trim; trimmed! }
Example Output:
trimmed!

upper

Arguments: <text>

Returns string as uppercase

Example Input:
{upper;this will become uppercase}
Example Output:
THIS WILL BECOME UPPERCASE

uriencode

Arguments: <text>

Encodes a chunk of text in URI format. Useful for constructing links.

Example Input:
​{uriencode;Hello world!}
Example Output:
Hello%20world!

useravatar

Arguments: [user] [quiet]

Returns the user's avatar. If name is specified, gets that user instead. If quiet is specified, if a user can't be found it will simply return the name

Example Input:
Your avatar is {useravatar}
Example Output:
Your avatar is (avatar url)

usercreatedat

Arguments: [format] [user] [quiet]

Returns the date the user was created, in UTC+0. If a format code is specified, the date is formatted accordingly. Leave blank for default formatting. See the moment documentation for more information. If name is specified, gets that user instead. If quiet is specified, if a user can't be found it will simply return the name

Example Input:
Your account was created on {usercreatedat;YYYY/MM/DD HH:mm:ss}
Example Output:
Your account was created on 2016/01/01 01:00:00.

userdiscrim

Arguments: [user] [quiet]

Returns the user's discriminator. If name is specified, gets that user instead. If quiet is specified, if a user can't be found it will simply return the name

Example Input:
Your discrim is {userdiscrim}
Example Output:
Your discrim is 1234

usergame

Arguments: [user] [quiet]

Returns the game the user is playing. If the user isn't playing a game, returns the word 'nothing'. If name is specified, gets that user instead. If quiet is specified, if a user can't be found it will simply return the name

Example Input:
You are playing {usergame}
Example Output:
You are playing with bbtag

usergametype

Arguments: [user] [quiet]

Returns how the user is playing the game (playing, streaming). If name is specified, gets that user instead. If quiet is specified, if a user can't be found it will simply return the name

Example Input:
You're {usergametype} right now!
Example Output:
You're playing right now!

userid

Arguments: [user] [quiet]

Returns the user's ID. If name is specified, gets that user instead. If quiet is specified, if a user can't be found it will simply return the name

Example Input:
Your id is {userid}
Example Output:
Your id is 123456789123456

userjoinedat

Arguments: [format] [user] [quiet]

Returns the date the user joined the current guild, in UTC+0. If a format code is specified, the date is formatted accordingly. Leave blank for default formatting. See the moment documentation for more information. If name is specified, gets that user instead. If quiet is specified, if a user can't be found it will simply return the name

Example Input:
Your account joined this guild on {userjoinedat;YYYY/MM/DD HH:mm:ss}
Example Output:
Your account joined this guild on 2016/01/01 01:00:00

username

Arguments: [user] [quiet]

Returns the user's name. If name is specified, gets that user instead. If quiet is specified, if a user can't be found it will simply return the name

Example Input:
Your username is {username;stupid;this can be anything}
Example Output:
Your username is stupid cat

usernick

Arguments: [user] [quiet]

Returns the user's nickname. If it doesn't exist, returns their username instead. If name is specified, gets that user instead. If quiet is specified, if a user can't be found it will simply return the name

Example Input:
Your nick is {usernick}
Example Output:
Your nick is cat

userstatus

Arguments: [user] [quiet]

Returns the status of the specified user ('online', 'idle', 'dnd', or 'offline'). If name is specified, gets that user instead. If quiet is specified, if a user can't be found it will simply return the name

Example Input:
Your are currently {userstatus}
Example Output:
Your are currently online

void

Arguments: [anything]

Parses its inner tags, but doesn't return anything.

Example Input:
{void;This won't be outputted!}
Example Output:

warnings

Arguments: [user]

Gets the number of warnings a user has.

Example Input:
You have {warnings} warning(s)!
Example Output:
You have 0 warning(s)!

webhook

Arguments: <id> <token> [content] [embed] [username] [avatarURL]

Executes a webhook. The embed must be provided in a raw JSON format, properly escaped for BBTag. A simple escaping utility can be accessed here. Please assign your webhook credentials to private variables! Do not leave them in your code.

Example Input:
{webhook;1111111111111111;t.OK-en;Hello!}
Example Output:
In the webhook channel: Hello!

Array

Functions designed specifically for arrays.

apply

Arguments: <tag> <args>

Executes the provided tag, using the array args as parameters.

Example Input:
{apply;randint;[1,4]}
Example Output:
3

concat

Arguments: <arrays>...

Combines multiple arrays and outputs the new array.

Example Input:
{concat;["this", "is"];["an", "array"]}
Example Output:
["this","is","an","array"]

isarray

Arguments: <text>

Determines whether the provided text is a valid array.

Example Input:
{isarray;["array?"]} {isarray;array?}
Example Output:
true false

join

Arguments: <array> <text>

Joins the elements of an array together with the provided text.

Example Input:
{join;["this", "is", "an", "array"];!}
Example Output:
this!is!an!array

match

Arguments: <text> <regex>

Returns an array of everything in text that matches regex.

Example Input:
{match;I have $1 and 25 cents;/\d+/g}
Example Output:
["1", "25"]

pop

Arguments: <pop>

Returns the last element in an array. If used with {get} or {aget}, this will remove the last element from the array as well.

Example Input:
{pop;["this", "is", "an", "array"]}
Example Output:
array

push

Arguments: <array> <values>...

Pushes values into an array. If used with {get} or {aget}, this will update the original variable. Otherwise, it will simply output the new array.

Example Input:
{push;["this", "is", "an"];array}
Example Output:
["this","is","an","array"]

shift

Arguments: <array>

Returns the first element in an array. If used with {get} or {aget}, this will remove the first element from the array as well.

Example Input:
{shift;["this", "is", "an", "array"]}
Example Output:
this

slice

Arguments: <array> <start> [end]

Grabs elements between the zero-indexed start and end points (inclusive).

Example Input:
{slice;["this", "is", "an", "array"];1}
Example Output:
["is", "an", "array"]

sort

Arguments: <array> [descending]

Sorts the provided array in ascending order. If descending is provided, sorts in descending order. If {get} or {aget} are used, will modify the original array.

Example Input:
{sort;[3, 2, 5, 1, 4]}
Example Output:
[1,2,3,4,5]

splice

Arguments: <array> <start> [deleteCount] [items]...

Removes deleteCount elements (defaults to all) starting at index start from the specified array. Then, adds each subsequent item at that position in the array. Returns the removed items.

Example Input:
{set;array;["this", "is", "an", "array"]} {splice;{get;array};1;1;was} {get;array}
Example Output:
["is"] ["this","was","an","array"]

split

Arguments: <text> <splitter>

Splits text using the provided splitter, and the returns an array.

Example Input:
{split;Hello! This is a sentence.;{space}}
Example Output:
["Hello!","This","is","a","sentence."]

Custom Command

Functions that only work in custom commands (not tags).

addrole

Arguments: <role> [user]

Gives a user a role, where role is a role ID or mention. You can find a list of roles and their ids by doing `b!roles`. Returns true if a role was given, and false otherwise.

Example Input:
Have a role! {addrole;11111111111111111}
Example Output:
Have a role! true

ban

Arguments: <user> [days to delete] [reason] [time until unban] [noperms]

Bans a user. This functions the same as the ban command. If noperms is provided, do not check if the command executor is actually able to ban people. Only provide this if you know what you're doing.

Example Input:
{ban;@user;0;This is a test ban}@user was banned!
Example Output:
@user was banned!

channel

Arguments: <channel> [message]

Please use the {send} tag instead of this. Sends the output to a specific channel. Only works in custom commands. If a message is specified, it will create a new message in the specified channel instead of rerouting output.

Example Input:
{channel;#channel}Hello!
Example Output:
In #channel: Hello!

dm

Arguments:

DMs a user. You may only send one DM per execution. Requires author to be staff, and the user to be on the current guild.

Example Input:
{dm;stupid cat;Hello}
Example Output:
DM: Hello

edit

Arguments: [channelid] <messageid> <message>

Edits a message outputted by the bot with the given message ID. The channel defaults to the current channel.

Example Input:
A message got edited: {edit;111111111111111111;New content}
Example Output:
(the message got edited idk how to do examples for this)

execcc

Arguments: <code> [user input]

Executes another ccommand. Useful for modules.

Example Input:
Let me do a ccommand for you. {execcc;f}
Example Output:
Let me do a ccommand for you. User#1111 has paid their respects. Total respects given: 5

modlog

Arguments: <action> <user> [mod] [reason] [color]

Creates a custom modlog entry for the given action and user. A color is a 6-digit hex code preceded by #.

Example Input:
You did a bad! {modlog;Bad;{userid};;They did a bad;#ffffff}
Example Output:
You did a bad! (modlog entry)

pardon

Arguments: [user] [count] [reason]

Gives a user the specified number of pardons with the given reason, and returns their new warning count.

Example Input:
Be pardoned! {pardon}
Example Output:
Be pardoned! 0

removerole

Arguments: <role> [user]

Removes a role from a user, where role is a role ID or mention. You can find a list of roles and their ids by doing `b!roles`. Returns true if a role was removed, and false otherwise.

Example Input:
No more role! {removerole;11111111111111111}
Example Output:
No more role! true

rolecreate

Arguments: <name> [color] [permissions] [mentionable] [hoisted]

Creates a role with the given information. Provide color in hex. Provide permissions as a number, which can be calculated here. Color defaults to 000000 (uncolored role), permissions defaults to 0, mentionable defaults to false, hoisted defaults to false. Returns the new role's ID.

Example Input:
{rolecreate;Super Cool Role!;ff0000;0;false;true}
Example Output:
11111111111111111

roledelete

Arguments: <name>

Deletes a role.

Example Input:
{roledelete;Super Cool Role!}
Example Output:
(rip no more super cool roles for anyone)

rolesetmentionable

Arguments: [value] [quiet]

Sets whether a role can be mentioned. value can be either true to set the role as mentionable, or anything else to set it to unmentionable. If value isn't provided, defaults to true. Throws an error if a role can't be found.

Example Input:
The admin role is now mentionable. {rolesetmentionable;admin;true}
Example Output:
The admin role is now mentionable.

send

Arguments: <channel> <message>

Sends the message to a specific channel, and returns the message ID. A channel is either an ID or channel mention.

Example Input:
{send;#channel;Hello!}
Example Output:
1111111111111111111 In #channel: Hello!

setnick

Arguments: >nick< [user]

Sets a user's nickname. Leave nick blank to reset their nickname.

Example Input:
{setnick;super cool nickname}
Example Output:

timer

Arguments: <code> <time>

Executes the provided code after a certain amount of time. Three timers are allowed per custom command, with no recursive timers.

Example Input:
{timer;Hello!;20s}
Example Output:
(after 20 seconds:) Hello!

unban

Arguments: <user> [reason] [noperms]

Unbans a user. This functions the same as the unban command. If noperms is provided, do not check if the command executor is actually able to ban people. Only provide this if you know what you're doing.

Example Input:
{unban;@user;0;This is a test unban}@user was unbanned!
Example Output:
@user was unbanned!

usermention

Arguments: [user] [quiet]

Mentions a user. If name is specified, gets that user instead. If quiet is specified, if a user can't be found it will simply return the name

Example Input:
Hello, {usermention}!
Example Output:
Hello, @user!

warn

Arguments: [user] [count] [reason]

Gives a user the specified number of warnings with the given reason, and returns their new warning count.

Example Input:
Be warned! {warn}
Example Output:
Be warned! 1

Examples

Tags can be combined, nested, and used together to create powerful commands. Here are some examples of existing tags.

waifu
  • stupid cat#8160

    b!t uwaifu stupid cat

  • blargbot#0128
    BOT

    ❤ I'd rate stupid cat as 9.5/10 ❤

{if;
  >;
  {argslength};
  0;
  {set;
    waifuhash;
    {hash;
      {userid;
        {args}}
    }
  }
  {set;
    waifurating;
    {math;
      %;
      {if;
        <;
        {get;waifuhash};
        0;
        {math;*;{get;waifuhash};-1};
        {get;waifuhash}
      };
      100
    }
  }
  {set;
    waifumoji;
    {if;
      <=;
      {get;waifurating};
      60;
      💔;
      ❤
    }
  }
  {get;waifumoji} I'd rate {usernick;{args}} as {math;/;{get;waifurating};10}/10 {get;waifumoji};
  Calculate the waifu rating of any user. Use waifu if you want to use any word.
Usage: `uwaifu <name>`
sleepykitty
Here's your sleepy kitty, {username}! {randchoose; http://i.imgur.com/zuhDRDT.gif ;http://i.imgur.com/0Jouxni.gif ;http://i.imgur.com/xP4Twvo.gif ;http://i.imgur.com/EDBtvW4.gif ;http://i.imgur.com/Pr0ovhy.gif ;http://i.imgur.com/CNh2Jen.gif ;http://i.imgur.com/lYTc1f3.gif ;http://i.imgur.com/9125v7e.gif ;http://i.imgur.com/d1cGI9H.gif ;http://i.imgur.com/Jdxjdgm.gif ;http://i.imgur.com/0ixS2gi.gif ;http://i.imgur.com/p8soxvZ.gif ;http://i.imgur.com/bssgLxK.gif ;http://i.imgur.com/tLVte5N.gif ;http://i.imgur.com/PyvrGTI.gif ;http://i.imgur.com/Hfh4LQH.gif ;http://i.imgur.com/mDTWNSY.gif ;http://i.imgur.com/fc3BsdW.gif ;http://i.imgur.com/vTXqGdS.gif ;http://i.imgur.com/DzMOiZx.gif ;http://i.imgur.com/IWa6N2B.gif ;http://i.imgur.com/YxYpOHc.gif ;http://i.imgur.com/YwLHV2L.gif}
f
  • stupid cat#8160

    b!t f

  • blargbot#0128
    BOT

    stupid cat has paid their respects. Total respects given: 13

{fallback;0}{set;respects;{math;+;{get;respects};1}} **{usernick}** has paid their respects. Total respects given: **{get;respects}**