0.1.3 • Published 3 years ago

easier-discord v0.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 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

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.0.9

3 years ago

0.0.8

3 years ago

0.0.7

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago