easy-discord-error
v1.0.1
Published
Discord.js error handler
Downloads
4
Readme
Discord error messages made easy
Installation
npm install easy-discord-error --save
Usage with Discord.js
const EDE = require("easy-discord-error");
const Discord = require("discord.js");
const bot = new Discord.Client();
bot.once("ready", () =>{
console.log("Test bot is on!");
})
bot.on("message", async(msg) =>{
if(msg.content.startsWith("error")){
try{
NOTDEFINED;
}catch(e){
EDE.errorHandler(e, msg, "777474453114191882", bot);// The "777474453114191882" is the owner's id
}
}
});
bot.login("TOKEN");
Output
That's what you'll see in your DMs!
If you use the embed version(EDE.embedErrorHandler
)
Usage with Eris
coming soon
Options
const { options } = require("discord-error-handler");
| Options | Function variables | Description | | ------------- |:----------------------------------:|:------------------------:| | errorHandler | error, message, id, Discord_client | send the error as a msg | |embedErrorHandler|error, message, id, Discord_client |Send the error as an embed|
stuck?
Get in touch with me!
My Discord (RaZe#2841)