I'm trying to use the readline for Node.js when working with my Discord bot to make handling inputs easier, however no matter what I do to the code it always runs the bot events only rather than the reader events as well. I'm not sure why this is and I really would like to be able to use both to output messages easier.
My bot:
'use strict';
const Discord = require('discord.js');
const Chalk = require('chalk');
const Readline = require('readline');
const Token;
const Script = require('./data.js');
const rl = Readline.createInterface({
input: process.stdin,
output: process.stdout
});
rl.question(Chalk.yellow("Enter guild representative's ID: ", (answer) => {
rep = answer;
console.log(Chalk.green("ID Recorded: " + rep));
}));
rl.question(Chalk.magenta("Enter embed color: ", (answer) => {
color = answer;
console.log(Chalk.green("Color recorded: " + color));
}));
rl.question(Chalk.blueBright("Enter guild description: ", (answer) => {
color = answer;
console.log(Chalk.green("Color recorded: " + color));
}));
const bot = new Discord.Client();
bot.on("ready", () => {
console.log("Bot is ready!");
});
bot.on("message", (message) => {
if (message.content == ":addPartner") {
message.guild.channels.find("name", "affiliates").send({ embed });
message.channel.send(":white_check_mark: Affiliate message sent in #affiliates!");
*/
}
});