npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

discbot-easy

v5.5.5

Published

Easy communication and management of discord.js.

Downloads

10

Readme

Contents

discbot-easy

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.

Installation

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

Requirement

Example

Defining the required packages.

const Discord = require("discord.js");
const discordbot = new Discord.Client();
const discbot = require("discbot-easy");

discordbot.login("TOKEN");

Bot

Boost Info

discbot.boostinfo(discordbot, {
  channel_id: "CHANNEL ID",
  booster_text: "Member has boosted the server.",
  notBooster_text: "Member has unboosted the server.",
});

Help

discbot.help(discordbot, {
  prefix: "-",
  helpCmd: "help",
  help_text: "HELP TEXT",
});

Ping

discbot.ping(discordbot, {
  prefix: "-",
  bot_id: "BOT ID",
  bot_text: "BOT TEXT",
});

Status

discbot.status(discordbot, {
  bot_type: "PLAYING",
  bot_title: "Hello",
});

Suggest

discbot.suggest(discordbot, {
  prefix: "-",
  suggestCmd: "suggest",
  suggestion_error: "Enter your suggestion."
});

Timer

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.",
});

Welcome

discbot.welcome(discordbot, {
  server_id: "SERVER ID",
  channel_id: "CHANNEL ID",
  welcome_message: "A new member has just joined the server!",
});

Chat

Lockchannel

discbot.lockchannel(discordbot, {
  prefix: "-",
  lockchannelCmd: "lockchannel",
  permission_error: "You don't have permission to do that.",
});

Purge

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.",
});

Slowmode

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.",
});

Snipe

discbot.snipe(discordbot, {
  prefix: "-",
  snipeCmd: "snipe",
  snipe_error: "There is nothing to snipe.",
});

Unlockchannel

discbot.unlockchannel(discordbot, {
  prefix: "-",
  lockchannelCmd: "unlockchannel",
  permission_error: "You don't have permission to do that.",
});

Fun

Avatar

discbot.avatar(discordbot, {
  prefix: "-",
  avatarCmd: "avatar",
});

Dice

discbot.dice(discordbot, {
  prefix: "-",
  diceCmd: "dice",
  dice_text: "Your number is:",
});

Message

discbot.message(discordbot, {
  prefix: "-",
  messageCmd: "message",
  mention_error: "Mention someone.",
  text_error: "Enter text.",
});

Mydevice

discbot.mydevice(discordbot, {
  prefix: "-",
  mydeviceCmd: "mydevice",
});

Randomnumber

discbot.randomnumber(discordbot, {
  prefix: "-",
  randomnumberCmd: "randomnumber",
  number_error: "Enter number.",
  NaN_error: "Enter a valid number.",
});

Say

discbot.say(discordbot, {
  prefix: "-",
  sayCmd: "say",
  text_error: "Enter text.",
});

Giveaway

Creategw

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.",
});

Member Management

Ban

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.",
});

Addrole

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.",
});

Kick

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.",
});

Mute

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.",
});

Removerole

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.",
});

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.",
});

Stats

discbot.stats(discordbot, {
  prefix: "-",
  statsCmd: "stats",
});

Unmute

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.",
});

Search

Google

discbot.google(discordbot, {
  prefix: "-",
  googleCmd: "google",
  text_error: "Enter text.",
});

Server

Server

discbot.server(discordbot, {
  prefix: "-",
  serverCmd: "server",
});

Default Options

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.

Author

drb0r1s

Discord: boris#1111

Help

If you need help using the package or have a question, contact the author.