Tokens
legend
- token name - <required argument: type> [optional argument: type = default] - description - aliases (names that will work instead of the main name)
*n after an argument means it is repeatable, with a minimum of n.
In the context of booleans, "falsey" values are false
, 0
, any text that trims down to "0"
or ""
, and empty results. Anything else is "truthy".
argument types:
- text: Text that will not be processed as a token
- number: A number that will not be processed as a token
- token: A single token, either within {} or entirely plaintext
- numerical token: A single token, either within {} or entirely plaintext, that has to resolve to something that can be parsed as a number
- anything: Any otherwise valid combination of tokens, including plaintext
boolean tokens
- not - <condition: token>*1+ - True if all inputs are falsey, false otherwise.
- or - <condition: token>*2+ - True if any input is truthy, false otherwise.
- and - <condition: token>*2+ - True if all inputs are truthy, false otherwise.
- equal - <argument: anything>*2+ - True if all inputs are equal, by having exactly the same values, by converting to the same numbers, or by converting to the same text. Otherwise false.
- greaterthan - <number: numerical token>*2+ - True if each input is larger than the next, false otherwise. - aliases: >
- lessthan - <number: numerical token>*2+ - True if each input is smaller than the next, false otherwise. - aliases: <
math tokens
- math - <expression: anything> - The outcome of evaluating the contents as a mathematical expression.
- max - <value: numerical token>*2+ - The highest number of all arguments.
- min - <value: numerical token>*2+ - The lowest number of all arguments.
- sum - <value: numerical token>*2+ - The sum of all the values.
- product - <value: numerical token>*2+ - The product of all the values. - aliases: prod
- reciprocal - <value: numerical token> - The reciprocal (1/x) of the value.
- absolute - <value: numerical token> - The absolute value. - aliases: abs
- power - <base: numerical token>, <exponent: numerical token> - The base raised to the power of the exponent. - aliases: pow
- modulo - <dividend: numerical token>, <divisor: numerical token> - The modulo of the dividend divided by the divisor.
- sine - <value: numerical token> - The sine of the number. - aliases: sin
- cosine - <value: numerical token> - The cosine of the number. - aliases: cos
- tangent - <value: numerical token> - The tangent of the number. - aliases: tan
- round - <value: numerical token>, [precision: number = 0] - The number rounded to the chosen precision.
- pi - Pi. - aliases: ฯ
misc tokens
- alias - <target: text> - Makes a command an alias for another command. It needs to be the only token in the command.
- argument - [number: number], [default: anything] - An argument (separated by spaces) passed when the command was invoked, specified by the number. If a number is not given, it uses a default number, which starts at 0 and increments for each processed numberless argument token. - aliases: arg
- arguments - [number: number], [default: anything] - The rest of the arguments (separated by spaces) passed when the command was invoked, starting from the argument indicated by the given number. If a number is not given, it uses a default number, which starts at 0 and increments for each processed numberless argument token. - aliases: args
- variable - <name: text>, [contents: anything], [invisible: "vis", "invis"] - Stores the contents as a variable by that name, or retrieves previously stored content. Without "invis" as the third argument, it will also still output whatever it stores. - aliases: var
- emote - <id: number> - The custom emote by the ID, if the bot is in the guild that has it. If no emote found by the ID, outputs ๐ค. To get an emote's ID, right click -> open image on PC and see the file name.
- randominteger - [first: number = 100], [second: number = 0] - A random integer between the two numbers, inclusive. - aliases: randomint
- randomoption - <option: anything>*2+ - A random option from the list.
- weightedrandomoption - <weight: number>*2+, <option: anything>*2+ - A random option from the weighted list. - aliases: weightedoption
- usages - The number of times the command has been used.
- ordinal - <number: numerical token> - The ordinal of the number (1 -> 1st, 2 -> 2nd etc.).
- tostring - <number: numerical token>, [base: number = 10] - The number as text in the given base.
- if - <condition: token>*1+, <result: anything>*1+, [else: anything] - The result matching the first truthy condition, or, with an odd number of arguments, if no condition is truthy, the last argument.
object tokens
- user - The user calling the command.
- randomuser - A random user, excluding bots, the command user and any user that was already randomly selected.
- activeuser - [scope: "domain", "channel"] - A random user that has spoken in the last 15 minutes, excluding bots, the command user and any user that was already randomly selected.
- inactiveuser - [scope: "domain", "channel"] - A random user that has not spoken in the last 15 minutes, excluding bots, the command user and any user that was already randomly selected.
- todayuser - [scope: "domain", "channel"] - A random user that has spoken in the last 24 hours, excluding bots, the command user and any user that was already randomly selected.
- nottodayuser - [scope: "domain", "channel"] - A random user that has not spoken in the last 24 hours, excluding bots, the command user and any user that was already randomly selected.
- aliveuser - [scope: "domain", "channel"] - A random user that has spoken in the last 28 days, excluding bots, the command user and any user that was already randomly selected.
- deaduser - [scope: "domain", "channel"] - A random user that has not spoken in the last 28 days, excluding bots, the command user and any user that was already randomly selected.
- id - <object: token> - The id of the object. Currently only applies to users.
text tokens
- slice - <text: anything>, [start: numerical token = 0], [end: numerical token] - A subsection of the text from start to end. Negative indices count from the end.
- length - <text: anything> - The length of the text.
- uppercase - <text: anything> - The text transformed to uppercase.
- lowercase - <text: anything> - The text transformed to lowercase.
- uriencode - <text: anything> - The text encoded as a URI component (special characters replaced with % encoding).
- bold - <text: anything> - The text transformed to bold Unicode characters, ๐ฅ๐ข๐ค๐ ๐ญ๐ก๐๐ฌ๐.
- doublestruck - <text: anything> - The text transformed to doublestruck Unicode characters, ๐๐๐๐ ๐ฅ๐๐๐ค๐.
- superscript - <text: anything> - The text transformed to superscript Unicode characters, แถซแถฆแตแต แตสฐแตหขแต.
- script - <text: anything> - The text transformed to script (hand-written style) Unicode characters, ๐ต๐ฒ๐ด๐ฎ ๐ฝ๐ฑ๐ฎ๐ผ๐ฎ.
- fraktur - <text: anything> - The text transformed to Fraktur Unicode characters, ๐๐๐๐ ๐๐๐๐๐.
- rot13 - <text: anything> - The text encrypted (or decrypted) with rot 13, yvxr guvf.
- smallcaps - <text: anything> - The text with lowercase characters replaced with smallcaps Unicode characters, สษชแดแด แดสแดsแด.
- emojis - <text: anything> - The text with uppercase characters and numbers replaced with regional indicator and keycap Unicode emoji characters, ๐ฑยญ๐ฎยญ๐ฐยญ๐ชยญ ๐นยญ๐ญยญ๐ชยญ๐ธยญ๐ช.
- braille - <text: anything> - The text transformed to braille Unicode characters, โ โ โ โ โ โ โ โ โ . It is not very correct.
- tonumber - <text: anything>, [base: number = 10] - The text converted to a number, interpreted as a specific base.
time tokens
- year - The year. - aliases: currentyear
- month - [style: "number", "padded", "name"] - The month of the year.
- day - [style: "number", "padded", "week"] - The day of the month, or of the week.
- hour - [style: "number", "padded"] - The hour of the day.
- minute - [style: "number", "padded"] - The minute of the hour.
- second - [style: "number", "padded"] - The second of the minute.
- timestamp - The number of milliseconds since the start of 1970.
- clock - A clock emoji representing the time, rounded down.
- moon - [style: "emoji", "text"] - An emoji or text representing roughly the moon phase.
- changedate - <offset: anything> - Changes the date used by other time-related tokens by an offset, formatted like "10d 30m".