dg-djs

1.10.22 • Public • Published

DG-DJS - A discord.js extention

About

DG-DJS is an addon for Discord.js to make some functions easier for the beginners. Created by DieselGaming67#1689 on 30/03/2019

Installation

Discord.js@11.4.2 and Node.js@8.x is needed to use this module, to install dg-djs run this command in a terminal from your bot folder:

  • Install DG-DJS:
npm install dg-djs --save

Example Usage

const Discord = require('discord.js'),
    bot = new Discord.Client();
 
const DJS = require('dg-djs'),
    botClient = new DJS.Client(bot);
 
bot.on('ready', () => {
    botClient.setPlaying("on Discord!");
    console.log(`Logged in as ${bot.user.tag}!`);
});
 
const prefix = "!"
 
bot.on('message', (message) => {
 
    const args = message.content.slice(prefix.length).trim().split(/ +/g);
 
    if(message.content === `${prefix}ping`){
        botClient.message.create({
            to: message.channel.id,
            content: "Pong!"
        });
    } else if(message.content === `${prefix}embed`){
        let embed = new DJS.Embed()
        .setColor("BLUE")
        .setTitle("This is an embed!");
        botClient.message.create({
            to: message.channel.id,
            attachEmbed: embed
        });
    } else if (message.content === `${prefix}role`){
        botClient.utils.findRole(message, args.join(" ")).then((d) => {
            let embed = new Discord.RichEmbed()
            .setTitle(d.name)
            .setColor(d.hexColor);
            botClient.message.create({
                to: message.channel.id,
                attachEmbed: embed
            });
        });
    }
});
 
bot.login('your discord bot token');

Author

Made by DieselGaming67#1689 to simplify some functions in the language Discord.JS, functions also include built-in YouTube Audio Playing!

Documentation

Documentation coming soon! Extra soon!

Help

You can DM DieselGaming67#1689 on Discord if you require help on this package!

/dg-djs/

    Package Sidebar

    Install

    npm i dg-djs

    Weekly Downloads

    4

    Version

    1.10.22

    License

    ISC

    Unpacked Size

    50.4 kB

    Total Files

    16

    Last publish

    Collaborators

    • dieselgaming