Hello
i have a small issue
i made a follower only mode on and off command but somehow only the moderators can use it and the broadcaster cant any idea what is did wrong ?
Here is one of the codes:
client.on(‘chat’, (channel, user, message, self) => {
if (self) return;
let sender = user[‘display-name’]
if (message.startsWith("!FD") && user.mod, user.broadcaster === true){
client.say(process.env.CHANNEL_TOKEN, “/followersoff”);
}
});
This suggests that user.broadcaster is not true.
Or user doesn’t contain what it is supposed to contain
Or user is derived from tags and is using the deprecated broadcaster tag instead of testing badges
Or user is derived from tags and is malfunctioning.
But in this case why would a mod or a broadcaster user a bot command when they can just do /followersoff themself. Basically doesn’t make sense to ask the caster or a mod to sue a bot command when the caster or a mod can do it themself. You have needless reimlemented a channel command.
So either fix how your user is generated or if you are using a library (which you didn’t declare so I’m assuming plain javascript, but you didn’t declare your language either) refer to that libraries documentation.