Simple toolkit for revolt.js
Simple toolkit for revolt.js
npm i revolttools.js
🟢 The examples are provided with revolthandler.js
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
}
}
//"./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())*/
},
};