Java script to stop bot from sending message

Hi.
i want to stop bot from responding to me on my channel…Could you please help me with a java script code for the same

@GameWithGlam If you want Nighbot not to send message, then just Part Channel, Nightbot will disconnect and, ready to go. It can be done something like this:

$(eval '$(channel)' === 'CHANNEL_NAME' ? ' ': 'I am responding cause this is not $(channel)')

I guess. Uff

i dont want to part from the channel…i just dont want it to reply to me when i send a text that triggers the command… i want it to reply to others on the chat only.

@GameWithGlam Well… You need to modify the commands.

$(eval "$(user)" === "YOU_USER_NAME" ? " " : "COMMAND_RESPONSE_HERE")

Suppose a normal !hi command.

!editcom -cd=5 !hi $(eval "$(user)" === "Ritik_Ranjan" ? " " : "Hi $(user)")

It should work something like this:

Ritik: !hi
ABC: !hi
Nighbot: Hi ABC

Regards

I have already tried this, night bot still sends a blank message
image

This solution would work on Twitch due to the inability to post just a space as a message. However this restriction doesn’t exist on Youtube gaming as you can see.

I was able to create a message that couldn’t send with a Zero Width Space, so you’re response can just return one. Easy Copy Paste Link

image

Something like this:

$(eval "$(user)" === "aaron128l" ? "​" : "COMMAND_RESPONSE_HERE")

Yes there is a space in between “” you can tell if you copy and paste it and try to navigate with your arrow keys.

3 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.