akita.ts
TypeScript icon, indicating that this package has built-in type declarations

1.3.3-dev • Public • Published

AkitaTS - Imagine easy bots

Fast, easy and string based with BDFD syntax

Japanese Akita


// import { AkitaClient } from "akita.ts";
var { AkitaClient } = require("akita.ts")
var client = new AkitaClient({
        intents: [1, 2, 512, 32768] /* example discord intents */
    }, "BOT_PREFIX")
client.onMessageCreate()
client.addCommand({
    names: ["test"],
    type: "MESSAGE",
    code: `
    $setContent[Hi $author[username]!]
    $send[no]
    `
})
client.login("YOUR_BOT_TOKEN")

support server

documentation


Custom Functions

// import { FunctionBuilder } from "akita.ts";
client.interpreter.addFunction({
    data: new FunctionBuilder()
        .setName('THE FUNCTION NAME WITHOUT $') // "myFunc"
        .setValue('description', 'THE FUNCTION DESCRIPTION') // "makes something"
        .setValue('use', 'AN EXAMPLE OF USE') // "$myFunc[arg1;arg2;...rest]"
        .setValue('returns', 'TYPE'), // "String"
    code: async function (/* this: That */) => {
        // This will allow the inside of $myFunc to be executed!
        // await this.resolveFields()

        // This execute an especific field of $myFunc
        // await this.resolveFields(index, end?)
        return this.makeReturn(/* result value here */)
    }
});

Package Sidebar

Install

npm i akita.ts

Weekly Downloads

0

Version

1.3.3-dev

License

MIT

Unpacked Size

104 kB

Total Files

99

Last publish

Collaborators

  • midowo
  • pavez