1.1.0 • Published 3 years ago

taku.js v1.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

Taku.js

About

Taku.js is the Official API for connecting to Taku.js backend.

Installation

npm install taku.js

Example Bot:

import Taku from 'taku.js';
const Taku = new TAKU(process.env.BOT_TOKEN, true, "!");

Taku.on("message", async (message: IMessage) => {
  // {...} do something with message
})

Taku.on("command", async (command: IParsedMessage) => {
  // {...} do something with command
})

Example Whois Command:

import Taku from 'taku.js';
const Taku = new TAKU(process.env.BOT_TOKEN, true, "!");

Taku.on("command", async (command: IParsedMessage) => {
  if (command.author_id == "9af3e207-f075-469d-8f2d-f1821c27e3cb") return;
  if (command.name == "whois") {
    const user = await Taku.getUser(command.args[0]);
    if (!user) return Taku.send("Not Found");
    // {...] do something with user
  }
})

Example Message Embed:

const embed = MessageEmbed.toJSON(new MessageEmbed({
  title: "Message Embed",
  description: "This is a Message Embed",
  image: "https://cdn.discordapp.com/avatars/165087303281147904/a_7dcd0f0c6ca3bced355b43338b795987.gif",
  fields: [
    {name: "Email", content: "cimok@taku.moe"},
    {name: "Created", content: "1631893014502"}
  ]
}))

Todo

  • Add EventEmitters
  • Add better documentation
  • Add Bot gathering information (get information on the bot)
  • Add Custom Embeds (MessageEmbed etc)
  • Add Message Deletion, Edit etc
1.1.0

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago