Hi all
I’m new to the world of bots and coding and have stumbled across my first problem!
I’m currently making a Twitch bot.
I have my bot set to work across two Twitch channels currently, and have a command - for example !discord
My code looks like this:
if(message.toLowerCase() === ‘!discord’) {
client.say(channel=CHANNEL_NAME
, DISCORD_LINK
);
I have two pieces of code that look like this, with the discord link differing depending on the channel that the command is run in.
I have added “=CHANNEL_NAME” onto channel, which isolates the command to that stream. However, if I run the !discord command in one channel, it automatically runs the !discord command in the other channel.
Is there a way to isolate commands to just one channel, whilst having the option for multiple channels to use the bot?
I hope this all makes sense
Thanks so much