easier-discord
v0.1.3
Published
An easier way to use discord.js.
Downloads
3
Readme
easier-discordjs
![npmLogo] (https://upload.wikimedia.org/wikipedia/commons/thumb/d/db/Npm-logo.svg/1280px-Npm-logo.svg.png)
Getting Started
npm i easier-discord
const discord = require('discord.js') const easierDiscord = require('easier-discord')
const client = new discord.Client()
easierDiscord.clientReady(client)
client.login('BOT_TOKEN_HERE')
Output
node index.js easierDiscordClient is ready!
Functions
clientReady The clientReady function is used to console.log a message when the client is ready. Example:
const discord = require('discord.js') const easierDiscord = require('easier-discord')
const client = new discord.Client()
easierDiscord.clientReady(client)
client.login('BOT_TOKEN_HERE')
const discord = require('discord.js') const easierDiscord = require('easier-discord')
const client = new discord.Client() const prefix = '!'
easierDiscord.clientReady(client)
client.on('message', async(message) => { const args = message.content.slice(prefix.length).trim().split(' ') const command = args.shift().toLowerCase()
if(command ===
${prefix}ping
){ ping() } })client.login('BOT_TOKEN_HERE')