diff --git a/index.js b/index.js index 9b6b38c..ee95ecd 100644 --- a/index.js +++ b/index.js @@ -201,7 +201,7 @@ const actions = (where, message, from) => { botSay(where, process.env.PUBLIC_RADIO_STREAM) break case '!mute': - if (exploded[2] && ['on', 'off', 'state'].exploded[2] !== -1) { + if (exploded[2] && ['on', 'off', 'state'].indexOf(exploded[2]) !== -1) { switch (exploded[2]) { case 'on': isMute = true