1.2.8 • Published 3 years ago
discord.js-helper v1.2.8
discord.js-helper
Installation of the package
First install Nodejs. Then:
$ npm install discord.js-helper
🤟 Importing
// Using Node.js (require)
const helper = require('discord.js-helper');
// Using ES6 (import /export)
import helper from 'discord.js-helper';
Package functions and usage
embedBuilder
Example
client.on('message' ,(message) => {
if(message.content.startsWith('!embed')) {
helper.embedBuilder(message).setTitle(`Hewwo there!`).setDescription(`Howe are you doin?! ☺`)
}
})
DiscordTogether
Example
YouTube-Together
const Discord = require('discord.js');
const client = new Discord.Client();
const { DiscordTogether } = require('discord.js-helper');
const dt = new DiscordTogether(client);
client.on('message', async(msg) => {
if(msg.content.startsWith("!youtube-together")) {
let link = await dt.createTogether(message.member.voice.channel.id, 'youtube');
await msg.channel.send(link.code);
}
})
client.login('your bot token goes here')
Poker-Together
const discord = require('discord.js');
const client = new discord.Client();
client.helper = require('discord.js-helper')
client.on('ready', () => console.log(`I am ready!`));
let dt = new client.helper.DiscordTogether(client);
client.on('message', async(msg) => {
if(msg.content.startsWith("!poker-together")) {
let link = await dt.createTogether(msg.member.voice.channel.id, 'poker');
msg.channel.send(link.code);
}
})
client.login("your token goes here")
Chess
const Discord = require('discord.js');
const client = new Discord.Client();
const { DiscordTogether } = require('discord.js-helper');
client.dt = new DiscordTogether(client);
client.on('message', async (message) => {
if(message.content.toLowerCase() === '!chess') {
client.dt.createTogether(message.member.voice.channel.id, 'chess').then(async link => {
message.channel.send(`Here is your chess code link! ${link.code}`)
});
};
});
client.login('your bot token goes here')
Fishing
// Using Node.js (require)
const helper = require('discord.js-helper');
// Using ES6 (import /export)
import helper from 'discord.js-helper';
const Discord = require('discord.js');
const client = new Discord.Client();
const { DiscordTogether } = require('discord.js-helper');
client.dt = new DiscordTogether(client);
client.on('message', async (message) => {
if(message.content.toLowerCase() === '!fish') {
client.dt.createTogether(message.member.voice.channel.id, 'fishing').then(async link => {
message.channel.send(`Here is your fishing code link! ${link.code}`)
});
};
});
client.login('your bot token goes here')
Meme
Usage
const Discord = require('discord.js');
const client = new Discord.Client();
const helper = require('discord.js-helper');
client.on('message', async (message) => {
if(message.content.toLowerCase() === '!meme') {
helper.meme(message)
});
};
});
client.login('your bot token goes here')
1.2.8
3 years ago
1.2.7
3 years ago
1.2.6
3 years ago
1.2.5
3 years ago
1.2.4
3 years ago
1.2.3
3 years ago
1.2.2
3 years ago
1.2.1
3 years ago
1.2.0
3 years ago
3.0.6
3 years ago
3.0.5
3 years ago
3.0.4
3 years ago
3.0.3
3 years ago
3.0.2
3 years ago
3.0.1
3 years ago
3.0.0
3 years ago
2.0.5
3 years ago
2.0.4
3 years ago
2.0.2
3 years ago
2.0.1
3 years ago
2.0.0
3 years ago
1.0.9
3 years ago
1.0.8
3 years ago
1.0.7
3 years ago
1.0.6
3 years ago
1.0.5
3 years ago
1.0.4
3 years ago
1.0.3
3 years ago
1.0.2
3 years ago
1.0.1
3 years ago
1.0.0
3 years ago
0.16.3
3 years ago
0.0.3
3 years ago
0.0.2
3 years ago
0.0.1
3 years ago