0.1.3 • Published 4 years ago

easier-discord v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

easier-discordjs

npmLogo

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') Output easierDiscordClient is ready! ping You can use the ping function to return an automatic latency and api latency. The usage is shown below.

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')

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago