diff --git a/src/node/TwitchBot.js b/src/node/TwitchBot.js index 89adf70..39f8299 100644 --- a/src/node/TwitchBot.js +++ b/src/node/TwitchBot.js @@ -1,5 +1,5 @@ import EventEmitter from 'events' - +import Color from 'color' import ejs from 'ejs' import { State } from 'xstate' import { ChatClient, SlowModeRateLimiter, LoginError } from 'dank-twitch-irc' @@ -47,7 +47,7 @@ export default class TwitchBot extends EventEmitter { async onReady() { const { client } = this const { channel, color } = this.config - await client.setColor(color) + await client.setColor(Color(color).object()) await client.join(channel) this.emit('connected') } diff --git a/src/node/index.js b/src/node/index.js index 74c75cf..0a12c03 100644 --- a/src/node/index.js +++ b/src/node/index.js @@ -1,7 +1,6 @@ import fs from 'fs' import yargs from 'yargs' import TOML from '@iarna/toml' -import Color from 'color' import { Repeater } from '@repeaterjs/repeater' import { app, shell, session, BrowserWindow } from 'electron' @@ -98,8 +97,7 @@ function parseArgs() { }) .option('twitch.color', { describe: 'Color of Twitch bot username', - coerce: (text) => Color(text).object(), - default: { r: 255, g: 0, b: 0 }, + default: '#ff0000', }) .option('twitch.announce.template', { describe: 'Message template for stream announcements',