const chalk = require("chalk"); const {startPrompt} = require("../lib/prompt"); function sendMode() { if (!comcord.state.currentChannel) { console.log(""); return; } startPrompt( chalk.bold.cyan(`[${comcord.client.user.username}]`) + " ".repeat( comcord.state.nameLength - (comcord.client.user.username.length + 2) ) + chalk.reset(" "), async function (input) { if (input == "") { console.log(""); } else { try { process.stdout.write("\n"); await comcord.client.createMessage( comcord.state.currentChannel, input ); } catch (err) { console.log(""); } } } ); } module.exports = {sendMode};