1.0.6 • Published 5 years ago
discord.js-ext v1.0.6
sudo apt-get install nodejs
Read the docs here: discordjs-ext.tk
const Discord = require('discord.js');
const bot = new Discord.Client();
const { Client } = require('discord.js-ext');
bot.ext = new Client(bot);
bot.on('ready', () => {
bot.ext.setGame('I\'m online !');
console.log(`Logged in as ${bot.user.tag}!`);
});
bot.on('message', msg => {
if (msg.content === 'ping') {
bot.ext.message.create({
to: msg.channel.id,
content: 'Pong!'
});
}
});
bot.login('token');