discord.easier
v1.3.1
Published
This module was created to ease the creation of your Discord Bot.
Downloads
1
Maintainers
Readme
discord.easier
This module was created to ease the creation of your Discord Bot.
Contents
Notes
The "easy methods" are methods with default elements that you can choose as you like. These methods start with "easy_" in their name.
Easy methods
easy_message
const discordEasier = require("discord.easier");
const bot = new discordEasier.Bot();
bot.easy_message(true, "!", ["say", "avatar"]);
This method has 3 parameters:
1 - Boolean: If is false, Bots will be able to reply to commands; otherwise, if is true, Bots will not be able to reply to commands (it is recommended to set this parameter to true).
2 - String: Your Bot's prefix.
3 - Array: Inside the array you can put any of the default commands we have for you:
say - avatar - help - ping
easy_ready
const discordEasier = require("discord.easier");
const bot = new discordEasier.Bot();
bot.easy_ready("Hello! This is the name of my presence", "WATCHING");
This method has 2 parameters:
1 - String: Name of your presence.
2 - String: Type of your presence. This parameter must include one of the following words:
PLAYING - WATCHING - LISTENING.
easy_guildMemberAdd
Note: To use this method, you must have intents activated from your application on the Discord Developer Portal.
const discordEasier = require("discord.easier");
const bot = new discordEasier.Bot();
bot.easy_guildMemberAdd("796219578580467746", "Welcome to server {member}!");
This method has 2 parameters:
1 - String: Channel ID.
2 - String: Content of the message to send. Here some keywords:
{member} | Mention the new member.
{member.id} | New member ID.
{member.username} | New member's username.
{member.avatar} | New member's avatar URL.
{guild.name} | The name of the server.
{guild.id} | The id of the server.
{guild.icon} | The icon of the server.
{guild.banner} | The banner of the server.
Methods
login
const discordEasier = require("discord.easier");
const bot = new discordEasier.Bot();
bot.login("My Discord Bot TOKEN");
This method has 1 parameter:
1 - String: Your Discord Bot token.
message
Note: This method is under development. Only the parameters shown below are available.
const discordEasier = require("discord.easier");
const bot = new discordEasier.Bot();
bot.message(true, "!", ["ping", "Pong!", "hi", "Hello!", "bye", "Bye!"]); // You must put the commands in lowercase.
This method has 3 parameters
1 - Boolean: If is false, Bots will be able to reply to commands; otherwise, if is true, Bots will not be able to reply to commands (it is recommended to set this parameter to true).
2 - String: Your Bot's prefix.
3 - Array: Your commands and responses. Follow this:
[command, answer, command, answer]
ready
const discordEasier = require("discord.easier");
const bot = new discordEasier.Bot();
bot.ready(["Hello!", "Wow!"], "PLAYING", true, 50, "I'm ready!");