1.0.0 • Published 5 years ago
@agmajs/script v1.0.0
@agmajs/script
Easy to use library to create scripts for any kind of .io game.
Installation
Using NPM:
$ npm install @agmajs/scriptUsing Yarn:
$ yarn add @agmajs/scriptUsage
Creating a Script
// index.js
const { createScript } = require("@agmajs/script");
const script = createScript({
info: {
name: 'basic-script',
version: 1,
description: 'A really cool script!',
author: 'Nuke'
}
});Single File Commands
// commands/index.js
module.exports = [
require('./test')
]// commands/test.js
const { defineCommand } = require("@agmajs/script");
module.exports = defineCommand({
name: "test",
run: (script, chatCtx, args) => {
chatCtx.value = 'Test';
}
});