npm install easy-discord-error --save
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");
That's what you'll see in your DMs!
If you use the embed version(EDE.embedErrorHandler
)
coming soon
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 |
Get in touch with me!
My Discord (RaZe#2841)