discord.js-simple

1.3.53 • Public • Published

Welcome to discord.js-simple Docs!

INFO: This package is designed for discord.js, if you do not have the package installed (discord.js) this package is pointless Join the support server

Usage:

//Define bot stuff up there.
const djs = require('discord.js-simple'); //Require the module
 
//Simple <Client>.on message
<Client>.on('message',message=>{
    if(message.content.startsWith('!embed')){
     //Simple embed
    message.channel.send(djs.Embed('Text','Desc','56789')) //This will get the embed function 
    //Arg 1 = Title, Arg 2 = Description, Arg 3 = Hex colour code
    //Can be executable arguments.
    }
    if(message.content.startsWith('!eval')){
    djs.Eval('your discord id',message)
    //Eval command
    }
    if(message.content.startsWith('!send')){
    djs.Send(message,'what you want to send')
    //Send a message
    }
    if(message.content.startsWith('!ping')){
    djs.Send(message,djs.Ping(message))
    //Display the ping
    //Using a previous function.
    }
    if(message.content.startsWith('!uptime')){
    djs.Send(message,`${djs.Uptime(message)}`)
    //Get your bots uptime.
    }
    if(message.content.startsWith('!say')){
    djs.Say(message,5)
    //The 5 is the length of the command, this has to include the prefix and a space after the command.
    //Sends a message.
    //A variation of the send command just made specifically for chat.
    }
    if(message.content.startsWith('!exec')){
    djs.Exec('your discord id',message)
    //We need your id so you can be the only who can use it.
    //No one else can you it other then the user's id you put in.
    //Simple exec command.
    }
 
});
 
//Bot login stuff

Changelog
Version 1.1.0

Added a Ping command.
Working eval command.

Version 1.2.0

Added a send command.
Added an embed command.

Package Sidebar

Install

npm i discord.js-simple

Weekly Downloads

9

Version

1.3.53

License

ISC

Unpacked Size

11.5 kB

Total Files

6

Last publish

Collaborators

  • salvage_dev