1.2.0 ā€¢ Published 12 months ago

revolttools.js v1.2.0

Weekly downloads
-
License
ISC
Repository
github
Last release
12 months ago

revolttools.js

Description

Simple toolkit for revolt.js

Table of contents

About

Simple toolkit for revolt.js

Badges

NPM Downloads

Install

npm i revolttools.js

Example

šŸŸ¢ The examples are provided with revolthandler.js

Example Embed Builder

CommonJS

//"./commands/general/ping.js"
const { EmbedBuilder } = require("revolttools.js");

exports.default = {
  name: "ping",
  description: "Ping!", //description :P
  //Be careful
  code(message, args, client) {
    let emb = new EmbedBuilder()
      .setDescription("Hello world!")
      .setTitle("pong")
      .setColour("red")//supports hex codes
      .setUrl("https://www.npmjs.com/package/revolttools.js")
      .setIconUrl(""); //You can add an picture in front of the title
      .setMedia("")//You can add an big picture
    message.channel.sendMessage({ embeds: [emb] });

  /*And you can get output as a json with console.log(emb.toJson())*/
  },
};

EsModule

import { EmbedBuilder } from "revolttools.js";

export default {
  name:"ping",
  description:"Ping!"
  code(message:any,args:string[],client:any){
    let emb = new EmbedBuilder()
      .setDescription("Hello world!")
      .setTitle("pong")
      .setColour("red")//supports hex codes
      .setUrl("https://www.npmjs.com/package/revolttools.js")
      .setIconUrl(""); //You can add an picture in front of the title
      .setMedia("")//You can add an big picture
    message.channel.sendMessage({ embeds: [emb] });

  /*And you can get output as a json with console.log(emb.toJson())*/F
  }
}

Example Image Uploader

//"./commands/general/ping.js"
const { EmbedBuilder, Uploader } = require("revolttools.js");

exports.default = {
  name: "ping",
  description: "Ping!", //description :P
  //Be careful
  async code(message, args, client) {
    const uploader = Uploader(client);
    let emb = new EmbedBuilder()
      .setDescription("It's image")
      .setTitle("Cool title")
      .setColour("orange") //supports hex codes
      .setMedia(await uploader.upload("https://api.mbps.tk/cdn/o7nf16yule.png","image.png")); //You can add an big picture
    message.channel.sendMessage({ embeds: [emb] });

    /*And you can get output as a json with console.log(emb.toJson())*/
  },
};

Will add new features in the future

revolttools.js

1.2.0

12 months ago

1.1.11

1 year ago

1.1.0

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago