command-handler.djs
v1.3.1
Published
Discord js command handler
Downloads
5
Maintainers
Readme
command-handler.djs
Command Handler for discord.js
const Discord = require("discord.js");
const client = new Discord.Client();
const DiscordHendler = require("command-handler.djs");
const Options = {prefix: "!",commandFile:"./commands",owners:['']};
const handler = new DiscordHendler.Client(client,Options);
handler.createHandler();
client.on("ready", () => {
console.log(client.user.username);
});
client.login("bot token");
exports.run = async (message, bot, args) => {
message.channel.send(`ping; ${bot.ws.ping}`);
};
exports.help = {
name:"ping",
aliases:["p"]
};
exports.conf ={
onlyOwner:{
system:false,
message:"Hey, {userName}{discriminator} This command is private to my owner!"//{userId}, {userName}, {discriminator}
},
guildOnly:{
system:false,
message:"Hey, {userName}{discriminator} bu komut sunucular içindir!"//{userId}, {userName}, {discriminator}
},
cooldown:{
system:true,
time:5000, //5000 = 5 second
message:"Hey, {userName}{discriminator}, you got a cooldown"//{userId}, {userName}, {discriminator}
}
};