tmijs / tmi.js

💬 Javascript library for the Twitch Messaging Interface. (Twitch.tv)
https://tmijs.com
MIT License
1.55k stars 215 forks source link

Can't send a whisper because of my settings, not sure which though #333

Closed JopLaane closed 4 years ago

JopLaane commented 5 years ago

Actual behaviour: It should send the streamer a whisper saying someone joined a discord voice call, but it returns the error that can be found below. I'm using these options:

groupOptions: {
            connection: {
                random: 'group' // found this online on an old thread
            },
            identity: {
                username: "botname",
                password: "token"
            },
}

Expected behaviour: It should send the streamer a whisper when someone joins the discord voice call.

Error log:

{
    "raw": "@msg-id=whisper_restricted;target-user-id=52660871 :tmi.twitch.tv NOTICE #tmijs :Your settings prevent you from sending this whisper.",
    "tags": {
        "msg-id": "whisper_restricted",
        "target-user-id": "52660871"
    },
    "prefix": "tmi.twitch.tv",
    "command": "NOTICE",
    "params": [
        "#tmijs",
        "Your settings prevent you from sending this whisper."
    ]
}

Server configuration

AlcaDesign commented 5 years ago

This is an ongoing issue with Twitch at the moment. It should resolve at some point.

JopLaane commented 5 years ago

I'm taking it's just not possible then? Thanks for the info @AlcaDesign!

AlcaDesign commented 5 years ago

It's only a recent issue, just days.

Frozenfire92 commented 5 years ago

This was a frustrating one to find. I found everything else was working but whispers just weren't being sent. (promise was resolving)

Once I found the debug: true flag in the options it became clear and led me to this issue

I found this on the twitch forms, it seems they think its fixed but still encountering this

https://discuss.dev.twitch.tv/t/unable-to-have-my-bot-send-whispers/21120

mattmazzola commented 5 years ago

Just ran into similar problem. client.whisper(username, message) does not throw error, but does not send the message.

Earlier in this thread / issue it was made seem like it's just a temporary problem with twitch services and will be resolved soon.

I found this post which I'm not sure if it's related but claims that sending whispers using bots is blocked and they have to use the Twitch API https://community.phantom.bot/t/bot-unable-to-send-any-whispers/1699/3

Can someone confirm if bot's are able to whisper?

I have ensured that the "Block Whispers from Strangers" is disabled. I have also followed and added the bot as a friend. (This won't work for average users, but I was just trying to eliminate possible errors)

AlcaDesign commented 5 years ago

Is your bot's account a known/verified bot? If you haven't gone through that process, Twitch might be limiting non-first party users from whispering to prevent abuse and that's affecting it. Just a stab in the dark, I don't have a lot of time. I'll have to get some communication with Twitch dev relations.

mattmazzola commented 5 years ago

No, it's not a verified bot.

I continued on this issue instead of starting a new one because I though it might be related and wanted to keep the knowledge consolidated; however perhaps it isn't a settings issue at all and just a new twitch policy as stated in the link above.

Anyways thanks for timely response. I will just work without whispers for now, I just wanted to see if it I had settings issue or I had code issue. I'm just starting bot development for another project and even with the most basic tmi sample changed to whisper it doesn't work so I assume it's not the code.

AlcaDesign commented 5 years ago

I was very recently watching someone live stream building a Twitch chat bot, using tmi.js. They had whispers working one day and then the next they completely stopped working. They were frustrated trying to figure out why something would just stop working. I don't really have the full picture of what's happening so it's hard to know exactly what the issue is. Plus the process for upgrading an account seems arduous for such a simple feature.

I do have the privilege of having a "verified bot" account and a "known bot" account early on, never personally had trouble whispering outside of general outages and not some intentional blocking. I've not yet set up to investigate it myself with a regular account.

mattmazzola commented 4 years ago

What was the reason this was closed?

Was this confirmed to be temporary bug with the Twitch API which as been fixed? Would imply the tmi library is now able to send whispers properly.

JopLaane commented 4 years ago

Probably because of long inactivity? If it's fixed that'd be great!

mattmazzola commented 4 years ago

Yea, I was afraid of that (closing for inactivity), meaning it's likely not fixed.

I might be able to test my bot soon to find out. The bot isn't verified or known or anything though which we thought was part of issue.

AlcaDesign commented 4 years ago

This is not an issue with the library and there's nothing else I can do.

LemonDoo commented 4 years ago

Just to update, this issue is still an issue! I cannot use /w whisper commands from my non verified accounts anymore but I can still type to chat with these same accounts using the socket.

akrizs commented 3 years ago

this is still not working btw... anyone found a solution?

AlcaDesign commented 3 years ago

The only solution is a partial solution. Twitch wants to prevent abuse of the whisper system.

Here's where it breaks down

akrizs commented 3 years ago

@AlcaDesign thanks for clarifying! I saw the validation/verification thing somewhere, perhaps here in the issue, applied for one right away hoping that will fix the whisper thing, will post if that is successful.

LSmith1122 commented 3 years ago

Just wanted to drop my findings here.

After a while, I started experiencing the same message "Your settings prevent you from sending this whisper." when testing a Streamlabs Chatbot script that I am working on. I'm not sure if this is what fixed the issue, but I changed the name of the script - specifically the "ScriptName" of the script, called its command, then changed the "ScriptName" back to the original name, and then I stopped receiving the error message.

I would try to retest this, but I'm not sure how to reproduce the issue. But, I hope this works and helps.

bugproof commented 2 years ago

Just wanted to drop my findings here.

After a while, I started experiencing the same message "Your settings prevent you from sending this whisper." when testing a Streamlabs Chatbot script that I am working on. I'm not sure if this is what fixed the issue, but I changed the name of the script - specifically the "ScriptName" of the script, called its command, then changed the "ScriptName" back to the original name, and then I stopped receiving the error message.

I would try to retest this, but I'm not sure how to reproduce the issue. But, I hope this works and helps.

Hi, did it work for you on unverified bot? How's that possible? I'm just getting whisper_restricted error everytime on my unverified bot. I wanted my bot to send private notification so others in the chat won't see it.