Closed jbmcfarlin31 closed 2 years ago
Whispers are actually blocked by twitch for any non-verified bot. So this isn't a problem with your code, it's just that twitch is telling you no
As another note, I would not suggest touching websocket code directly, as all of that is undocumented (and thus internal) and can be changed in any release
Whispers are actually blocked by twitch for any non-verified bot. So this isn't a problem with your code, it's just that twitch is telling you no
Ahhh, that makes sense! Thanks for the clarification. And thanks for the note on not touching the underlying WS code. I was kind of trying different ways based on examples I could find online - would've been nice to know about the verified bot issue beforehand, as it could've saved me some research LOL.
Perhaps that is something to add to the twitchio
docs?
Also, in regards to sending whispers, I presume my first attempt at it was the "correct" way for implementation? That is:
try:
await message.channel.send(response)
except:
await message.author.send(response)
I also saw under the channel
object the ability to do: await message.channel.whisper(response)
.
What is the difference between the two? The comment for whisper
says:
Whispers the user behind the channel. This will not work if the channel is the same as the one you are sending the message from.
So, I would assume this is for maybe sending a whisper to someone outside of the main users chat?
The details regarding whispers not being able to be sent is on the Twitch website and their docs, since it isn't a lib issue it wouldn't have been added to TIO docs. Even when a bot is verified whispers are not guaranteed to work by Twitch.
The general way to send whispers would be through PartialChatter.send() / Chatter.send() / message.author.send()
The details regarding whispers not being able to be sent is on the Twitch website and their docs, since it isn't a lib issue it wouldn't have been added to TIO docs. Even when a bot is verified whispers are not guaranteed to work by Twitch.
The general way to send whispers would be through PartialChatter.send() / Chatter.send() / message.author.send()
I didn't realize it was there in docs, sorry about that. I am still fairly new with Twitch development and their API's. All of this has been super helpful!
Much of this has been covered previously in the Discord as well as examples. I would recommend joining it.
Much of this has been covered previously in the Discord as well as examples. I would recommend joining it.
Just joined, thanks so much!
The bot verification process is pretty simple and Twitch usually responds fast. Here's the link:
Just pay attention to correctly answering all the fields of the form, as well you must have to edit the description field in the Twitch profile (bot) to describe what the bot's functionality is, ways to contact you, how to add it, and how to remove it from a channel. As an example, this is the response I had when I tried to verify a bot:
We received your request to verify your chat bot. Unfortunately, your request has been rejected for the following reasons:
- The description on your Bot's Twitch channel did not include all of the information needed to verify your request. Your bot must have the following included in its description:
- Developer contact information.
- A description of what the bot does.
- Instructions on how to add a bot to a channel
- Instructions on how to remove a bot from a channel.
- Your bot seems to still be in development
Once these issues have been resolved, please submit a new request for your bot rate limit increase.
Thank you, Twitch Developer Experience Team
After correct the fields and request verification again, here's the answer:
Greetings from Twitch!
I’m pleased to let you know that your request to verify your chat bot has been approved! Your account
has been upgraded to Verified status, granting it increased IRC messaging limits. You can view the increased limits on the Twitch Developer site here: https://dev.twitch.tv/docs/irc/guide#command--message-limits Thank you for being a valued member of the Twitch Developer community!
Twitch Developer Experience Team
Hope it helps.
The bot verification process is pretty simple and Twitch usually responds fast. Here's the link:
Just pay attention to correctly answering all the fields of the form, as well you must have to edit the description field in the Twitch profile (bot) to describe what the bot's functionality is, ways to contact you, how to add it, and how to remove it from a channel. As an example, this is the response I had when I tried to verify a bot:
We received your request to verify your chat bot. Unfortunately, your request has been rejected for the following reasons:
- The description on your Bot's Twitch channel did not include all of the information needed to verify your request. Your bot must have the following included in its description:
- Developer contact information.
- A description of what the bot does.
- Instructions on how to add a bot to a channel
- Instructions on how to remove a bot from a channel.
- Your bot seems to still be in development
Once these issues have been resolved, please submit a new request for your bot rate limit increase. Thank you, Twitch Developer Experience Team
After correct the fields and request verification again, here's the answer:
Greetings from Twitch! I’m pleased to let you know that your request to verify your chat bot has been approved! Your account
has been upgraded to Verified status, granting it increased IRC messaging limits. You can view the increased limits on the Twitch Developer site here: https://dev.twitch.tv/docs/irc/guide#command--message-limits Thank you for being a valued member of the Twitch Developer community! Twitch Developer Experience Team Hope it helps.
This is excellent! Exactly what I was looking for next once my bot development matures a little bit more. Appreciate the help and resources!
I am fairly new at playing with
twitchio
, so this is my first time building a bot with this library. Currently using:twitchio==2.1.3
With that being said, I am trying to respond to chat based on two cases:
For example, if a user in chat says "Hello there bot" I have my bot responding with "Hello there {user}". However, if someone whispers the bot with the same style of text, I want the bot to whisper back to the user the same response.
I can't seem to get the whisper part working...
Here is my code that handles the
event_message()
:The output I get is like so:
In my except clause, I have tried every portion of the following:
But neither of those error or send a whisper back. I tried checking the documentation but didn't really find anything pertaining to my scenario.
Any help is appreciated! Thanks!