discbot-easy is an npm package that can help with communication and easier interaction with discord.js.
With this package it is possible to design Discord Bot commands without knowledge of programming and discord.js.
To install and use this package you must first install discord.js:
npm i discord.js
After installing discord.js, you need to install the discbot-easy package:
npm i discbot-easy
const Discord = require("discord.js");
const discordbot = new Discord.Client();
const discbot = require("discbot-easy");
discordbot.login("TOKEN");
discbot.boostinfo(discordbot, {
channel_id: "CHANNEL ID",
booster_text: "Member has boosted the server.",
notBooster_text: "Member has unboosted the server.",
});
discbot.help(discordbot, {
prefix: "-",
helpCmd: "help",
help_text: "HELP TEXT",
});
discbot.ping(discordbot, {
prefix: "-",
bot_id: "BOT ID",
bot_text: "BOT TEXT",
});
discbot.status(discordbot, {
bot_type: "PLAYING",
bot_title: "Hello",
});
discbot.suggest(discordbot, {
prefix: "-",
suggestCmd: "suggest",
suggestion_error: "Enter your suggestion."
});
discbot.timer(discordbot, {
prefix: "-",
timerCmd: "timer",
time_error: "Enter time (seconds).",
NaN_error: "Enter a valid time.",
min_time_error: "Time should be more than or equal to 0.",
reason_error: "Enter reason.",
});
discbot.welcome(discordbot, {
server_id: "SERVER ID",
channel_id: "CHANNEL ID",
welcome_message: "A new member has just joined the server!",
});
discbot.lockchannel(discordbot, {
prefix: "-",
lockchannelCmd: "lockchannel",
permission_error: "You don't have permission to do that.",
});
discbot.purge(discordbot, {
prefix: "-",
purgeCmd: "purge",
permission_error: "You don't have permission to do that.",
NaN_error: "Enter the number of messages you want to delete.",
});
discbot.slowmode(discordbot, {
prefix: "-",
slowmodeCmd: "slowmode",
permission_error: "You don't have permission to do that.",
time_error: "Enter time.",
NaN_error: "Enter a valid time.",
max_time_error: "Slowmode should be less than or equal to 6 hours.",
min_time_error: "Slowmode should be more than or equal to 1 second.",
});
discbot.snipe(discordbot, {
prefix: "-",
snipeCmd: "snipe",
snipe_error: "There is nothing to snipe.",
});
discbot.unlockchannel(discordbot, {
prefix: "-",
lockchannelCmd: "unlockchannel",
permission_error: "You don't have permission to do that.",
});
discbot.avatar(discordbot, {
prefix: "-",
avatarCmd: "avatar",
});
discbot.dice(discordbot, {
prefix: "-",
diceCmd: "dice",
dice_text: "Your number is:",
});
discbot.message(discordbot, {
prefix: "-",
messageCmd: "message",
mention_error: "Mention someone.",
text_error: "Enter text.",
});
discbot.mydevice(discordbot, {
prefix: "-",
mydeviceCmd: "mydevice",
});
discbot.randomnumber(discordbot, {
prefix: "-",
randomnumberCmd: "randomnumber",
number_error: "Enter number.",
NaN_error: "Enter a valid number.",
});
discbot.say(discordbot, {
prefix: "-",
sayCmd: "say",
text_error: "Enter text.",
});
discbot.creategw(discordbot, {
prefix: "-",
creategwCmd: "creategw",
permission_error: "You don't have permission to do that.",
channel_error: "Mention channel.",
timer_error: "Enter time (minutes).",
winner_error: "Enter number of winners.",
NaN_error: "Enter a valid number.",
prize_error: "Enter prize.",
giveaway_emoji: "π",
no_reaction_error: "Not enough people reacted.",
});
discbot.ban(discordbot, {
prefix:"-",
banCmd: "ban",
permission_error: "You don't have permission to do that.",
mention_error: "Mention someone.",
higher_role_error: "You can't ban him.",
reason_error: "Enter a reason.",
});
discbot.addrole(discordbot, {
prefix: "-",
addroleCmd: "addrole",
permission_error: "You don't have permission to do that.",
mention_error: "Mention someone.",
newRole_error: "Enter Role ID.",
});
discbot.kick(discordbot, {
prefix:"-",
kickCmd: "kick",
permission_error: "You don't have permission to do that.",
mention_error: "Mention someone.",
higher_role_error: "You can't kick him.",
reason_error: "Enter a reason.",
});
discbot.mute(discordbot, {
prefix: "-",
muteCmd: "mute",
permission_error: "You don't have permission to do that.",
mention_error: "Mention someone.",
role_id: "ROLE ID",
already_muted_error: "This user is already muted.",
reason_error: "Enter reason.",
});
discbot.removerole(discordbot, {
prefix: "-",
removeroleCmd: "removerole",
permission_error: "You don't have permission to do that.",
mention_error: "Mention someone.",
oldRole_error: "Enter Role ID.",
});
discbot.setname(discordbot, {
prefix: "-",
setnameCmd: "setname",
permission_error: "You don't have permission to do that.",
mention_error: "Mention someone.",
newName_error: "Enter a new username.",
});
discbot.stats(discordbot, {
prefix: "-",
statsCmd: "stats",
});
discbot.unmute(discordbot, {
prefix: "-",
unmuteCmd: "unmute",
permission_error: "You don't have permission to do that.",
mention_error: "Mention someone.",
role_id: "ROLE ID",
not_muted_error: "This user is not muted.",
});
discbot.google(discordbot, {
prefix: "-",
googleCmd: "google",
text_error: "Enter text.",
});
discbot.server(discordbot, {
prefix: "-",
serverCmd: "server",
});
Commands can be used in whole or in part without defining options.
Example:
discbot.setname(discordbot);
If the options are not defined, when using the command, the options will be the ones that are the default.
Example:
// Default Options: setname
discbot.setname(discordbot, {
prefix: "-",
setnameCmd: "setname",
permission_error: "You don't have permission to do that.",
mention_error: "Mention someone.",
newName_error: "Enter a new username.",
});
In each command, the default prefix is ββ-.
The default name of each command is the same as the function name.
drb0r1s
Github: drb0r1s Discord: drb0r1s#9999 Email: contact@drb0r1s.xyz
If you need help using the package or have a question, contact the author.