Discord Chatbot
-> npm install discord.js smartestchatbot <-
// Use this command in terminal/console which is inside arrows
//Code Below make index and put this code there using modules are Very easy.
const { Client, Intents } = require('discord.js');
const client = new Client({ intents: [Intents.FLAGS.GUILDS] });
const smartestchatbot = require('smartestchatbot');
const chater = new smartestchatbot.Client();
client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);
});
client.on('messageCreate', async msg => {
chater.chat({message: msg, name:"SmartestChatbot", owner:"YourName", user: CoolUniqueUserId-In-NumberType}, "en").then(reply => {
console.log(reply);
msg.reply(reply)
// The module will reply based on the message!
});
});
client.login('token');
Different Dugong