Skip to content

nirewen/tatsuscript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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}`;
});

About

An Interpreter for Tatsumaki Tags

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published