Whisper_restricted error

I have developed a bot in .net. I can connect to twitch, send and receive public messages.
however, if I send a whisper command I get the following error message that I assume is known to everyone:

msg-id=whisper_restricted;target-user-id=xxxxxxxx :tmi.twitch.tv NOTICE #yyyyyyyyy :Your settings prevent you from sending this whisper.

it is not an error in the command because I tried everything:

1- :[username]![username]@[username].tmi.twitch.tv PRIVMSG #[Channelname] :/w [targetuser][whitespace][message]

2- PRIVMSG #[Channelname] :/w [targetuser][whitespace][message]"

with :/w or :.w
I always get the same error.

My bot is not verified and I don’t see why I have to do it just to reply to a whisper that was sent to me in my own channel!

Please, how can I send whisper with an unverified bot? Has anyone managed to do it?

best regards,

Whispers essentially don’t work for bots, regardless of if they’re verified or not. The whisper system was not initially designed for bot usage, and with whatever systems Twitch has in place to prevent misuse it means there is no reliable way for a bot to use whispers, it may work sometimes, or it may not ¯_(ツ)_/¯

1 Like

Merci Dist pour ta réponse qui est très utile pour se concentrer sur d’autres taches :).
Pourquoi alors la doc de twitch cite la commande pour envoyer un whisper et pourquoi le bot reçoit les whispers envoyé par des utilisateurs ?

The docs include info on whispers because theoretically it’s possible to whisper, but there’s so many restrictions, and spam bot prevention measures that aren’t disclosed in the docs, that it’s simply not a reliable system for bots to use as they are more likely for a whisper to fail than for it to be successful.

Because of that, the recommendation who’ve been working with bots on Twitch for years has always been to use other methods of communication. For example for chat bot, use chat. For bots that integrate with Extensions, use that to send data to specific users, or for some other use cases the best solution may be an off-site solution. Whispers are not recommended for bot usage, and if you try to use them then you’ll continue to run issues and there’s no avoiding that.

what do you mean by “For example for chat bot, use chat” ?

I mean if you’re using a bot that’s connected to chat, the best method of communication is chat messages in a channel itself rather than a whisper. Bot’s that are only connected to chat and are not an Extension, or running an external site, should generally stick to just sending messages publicly in channels.

1 Like

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