1.0.1 • Published 3 years ago

easy-discord-error v1.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

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!

without embed

If you use the embed version(EDE.embedErrorHandler)

embed

Usage with Eris

coming soon

Options

const { options } = require("discord-error-handler");

OptionsFunction variablesDescription
errorHandlererror, message, id, Discord_clientsend the error as a msg
embedErrorHandlererror, message, id, Discord_clientSend the error as an embed

stuck?

Get in touch with me!

My Discord (RaZe#2841)

Discord server

1.0.1

3 years ago

1.0.0

3 years ago

0.0.2-3.3

3 years ago

0.0.2-3.2

3 years ago

0.0.23

3 years ago

0.0.2-3.5

3 years ago

0.0.2-3.4

3 years ago

0.0.2-3.1

3 years ago

0.0.21

3 years ago

0.0.2

3 years ago

0.0.22

3 years ago

0.0.1

3 years ago