From ce5b043092b688796849918bf6068eeeb5a77c64 Mon Sep 17 00:00:00 2001 From: Sam Poder <39828164+sampoder@users.noreply.github.com> Date: Sun, 10 Jul 2022 15:42:48 -0400 Subject: [PATCH] Channel... --- src/interactions/css.js | 6 +++--- src/interactions/haiku.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/interactions/css.js b/src/interactions/css.js index eb21655..7e91447 100644 --- a/src/interactions/css.js +++ b/src/interactions/css.js @@ -1,8 +1,8 @@ import { reaction } from "../utils" let validateCss = require('css-validator'); -const interactionHaiku = async (bot, message) => { - const { text, ts } = message +const interactionCSS = async (bot, message) => { + const { text, channel, ts } = message validateCss({text}, async function (_, data) { if(data.validity){ await reaction(bot, 'add', channel, ts, 'art') @@ -10,4 +10,4 @@ const interactionHaiku = async (bot, message) => { }); } -export default interactionHaiku \ No newline at end of file +export default interactionCSS \ No newline at end of file diff --git a/src/interactions/haiku.js b/src/interactions/haiku.js index 73e2dae..bbe933a 100644 --- a/src/interactions/haiku.js +++ b/src/interactions/haiku.js @@ -2,7 +2,7 @@ import { reaction, transcript } from "../utils" import { format } from "haiku-detect" const interactionHaiku = async (bot, message) => { - const { text, user, ts } = message + const { text, user, ts, channel } = message const noLineText = text.replace(/\n/g, ' ') const haikuLines = format(noLineText) if (haikuLines.length == 3) {