2.1.0 • Published 4 years ago

tatsuscript v2.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
4 years ago

TatsuScript

David GitHub license npm

A Tatsumaki tag script interpreter

Installing

npm install tatsuscript --save

Usage

const TatsuScript = require('tatsuscript');

let script = '{abs;-1}'; // the absolute function

let output = TatsuScript.run(script, message); // the message is the context the command was run in

console.log(output); // 1

Registering custom functions

Example using Discord.JS

TatsuScript.registerFunction('sendfile', function (url) {
    url = this.interpret(url); // url should be interpreted, it's a token

    this.context.channel.send(new Discord.MessageAttachment(url));

    return `Sent file to ${this.context.channel.name}`;
});
2.1.0

4 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.1.0

6 years ago

1.0.0

6 years ago