Skip to content

Meta functions

Inferno edited this page Jan 21, 2023 · 8 revisions

func

Creates a function that can be reused in your tag.

[FUNC (name: string) (arguments: array) (code: function)]

Example code:

[FUNC root [ARRAY "number"] [POW [VAR number] 0.5]]
[root 144]

> 12.0

global define

Sets the value of a variable. Does save. You cannot edit existing global vars if you didn't make them, to ensure you can't override it.

[GLOBAL DEFINE (variable name: string) (value: any)]

Example code:

[GLOBAL DEFINE variable 9002]
> (no output)

global var

Gets a global variable.

[GLOBAL VAR (variable name: string)]

Example code:

[GLOBAL VAR variable]
> 9002

import

Imports all functions in a tag.

[IMPORT (tag: string)]

In the example, B* is importing a tag named root, which contains the function called root.

Example code:

[IMPORT root] [root 144]

> 12.0

user

Gets various stats about a user.

[USER (info: user stat)]
user stat is one of: name, id, discriminator, avatar, created_at, display_name, color, or accent_color

Example code:

[USER name]

> Infernity

username

Gets the discord username (not nickname) of the user who used the command.

No arguments.

Example code:

[USERNAME]

> Infernity

userid

Gets the user ID of the user who used the command.

No arguments.

Example code:

[USERID]

> 230873196247777280

Clone this wiki locally