Overview

Rune is the scripting language behind Functious tags. It is small on purpose, built for Fluxer, and fully sandboxed.

What is Rune?

A tag is a small program a server can invoke any time. It can be a reusable message, a minigame, a lookup. Rune is what you write inside it. The language uses braces for blocks and JS-style parentheses, so if you have written any scripting language before, it will feel immediately familiar.

  • Braces for blocks. Functions, loops, and conditionals group with { }.
  • A full standard library. Math, randomness, strings, lists, dicts, regex, and embeds are all built in.
  • Sandboxed by default. A runaway loop can never take the bot down with it.

Hello world

Rune strings interpolate [name] directly, and a few globals are always in scope. Greeting a member is one line.

rune
1 line
rune
1 line

Your first tag

Tags are stored on the bot. Create one with f!tags add, giving it a name, a type, and the code that runs when someone uses it.

Fluxer
f!tags add welcome text say("hello, world")

Now anyone can run it by name:

Fluxer
f!tags welcome

Anything typed after the tag name is passed to the code as args. args.0 is the first word, args.1 is the second, and so on. The Context chapter has the full details.

So f!tags greet rubik gives the tag an args.0 of "rubik", and [args.0] in the code is replaced with it. A single tag turns into a command.

Fluxer
f!tags add greet text say("hi [args.0]!")
f!tags greet rubik

Where tags live

You can build and manage tags with the f!tags command or visually from the dashboard. A tag can be plain text or a rich embed, reused across your server the moment you save it. This guide covers the language itself. Either place runs the same Rune.

Sandboxed by default

Rune runs in a sandbox with hard limits, so even a tag gone wrong is a single clean error instead of a problem.

Limits

200,000 evaluation steps per tag, a call depth of 100, 3,900 characters of output, and up to 10 embeds. A runaway loop simply hits the step limit and stops.

When a tag fails, Functious replies with a short embed naming the category of the error (parse vs. runtime). When it can, it also adds a code block with a caret pointing at the offending line.

What's in this guide