Skip to content

Commit

Permalink
chore(server): Remove terminal chat (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
skarab42 committed Jan 24, 2021
1 parent 48789b9 commit 24fb19c
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions app/server/libs/twitch/chat/events/onMessage.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@ const pushActions = require("../../pushActions");
const settings = require("../../../settings");
const onCommand = require("../onCommand");

const chalk = require("chalk");
const colors = new chalk.Instance({ level: 3 });

async function terminalChat(channel, nick, message, data) {
const color = colors.hex(data._tags.get("color"));
console.log("\x1b[35m%s\x1b[0m", "[chat]", color(`<${nick}>`), message);
}

function isCommand(prefix, message) {
return message.startsWith(prefix);
}
Expand All @@ -23,7 +15,6 @@ function parseCommand(prefix, message) {

module.exports = async function onMessage(channel, nick, message, data) {
pushActions("onMessage", { user: nick, message });
terminalChat(channel, nick, message, data);

const prefix = await settings.get("command.prefix");
if (!isCommand(prefix, message)) return;
Expand Down

0 comments on commit 24fb19c

Please sign in to comment.