1.10.22 • Published 5 years ago

dg-djs v1.10.22

Weekly downloads
1
License
ISC
Repository
-
Last release
5 years ago

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!

1.10.22

5 years ago

1.10.21

5 years ago

1.10.20

5 years ago

1.10.19

5 years ago

1.9.16

5 years ago

1.9.14

5 years ago

1.9.11

5 years ago

1.9.10

5 years ago

1.9.9

5 years ago

1.1.8

5 years ago

1.1.7

5 years ago

1.1.6

5 years ago

1.1.4

5 years ago

1.1.3

5 years ago

1.1.2

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago