Тэги:
#pyfhon #pytho #pytbon #pytjon #ptyhon #pytyon #ptthon #pyyhon #pythn #pythoh #pythpn #ython #pytgon #pyhon #pytohn #phthon #oython #pthon #pyghon #pythoj #pythno #pythkn #ypthon #pytuon #lython #pyrhon #pythom #pythob #puthon #pgthon #python #pyhton #pythln #pythin #pytnon #pytonКомментарии:
I am getting the KeyError: 'users' I've seen you say that the OWNER has to be lowercase, but that does not seem to be resolving the issue for me.
ОтветитьFor anyone who comes across this in the future this no longer works as the v5 api is deprecated and can no longer be used by new users and will be completely shut down in february
Ответитьhey, i've got this working for everything except the "Now online." message. any advice, or eta on the new tutorial?
this is my first time making a twitch bot and i'm fixated on using python because i want to add twitch integration to the sims 4 (which uses python)
Ok, so after a bunch of searching for other python bot builds that still had errors popping up with no one in the comments able to explain fixes, I found a way around for atleast this portion of the self.channel_id = resp["users"][0]["_id"] KeyError: 'users'. The Discord let me know that "a few months ago they deprecated twitch v5 API fully. If you did not access it before then, you no longer can" which was actually really helpful to know. I found that they now have twitchAPI.twitch which is what you will need for this fix. Follow this entire first video and then pip install twitchAPI. Next, in your Import do " from twitchAPI.twitch import Twitch" . Now, under the NAME, OWNER include "twitch = Twitch('your_app_id', 'your_app_secret')". NOTE: App ID and APP SECRET are 2 diff things if you didn't know this already. Now, the 3rd and final step (and again, this is just to be able to replicate what is shown here on screen, I have not yet tested all the other vids and the project as a whole) remove lines 43-46 (the one starts with 'url' in it) and replace it with (Had to include a Reply due to text limits so check below)
ОтветитьI'm only 8 minutes in and I HIGHLY suggest if following along and typing it out that you watch it at .50 speed. Not only is it easier than pausing and starting every few seconds, it makes him sound drunk and the typos really play into the idea. 10/10
ОтветитьNow that api v5 is shutting down, will you be doing a new tutorial for api v6, or just a quick video explaining how to migrate to a new version
ОтветитьAmazing tutorial! Just what I was looking for.
Does this still work?
I keep getting KeyError: 'users', when running the bot. I have reset the oauth token, and checked the client ID to be correct. NAME and OWNER are with lower case letters aswell.
Thanks
Could you please help me set it up in discord!! it would mean a lot to me
ОтветитьCould this bot be placed on anyones channel not just your own?
Ответитьi'm getting an error with self.channel_id = resp["users"][0]["_id"] , saying that the list is out of range. has the standard for the user's ID changed??
ОтветитьI run the bot, no errors, but also no message on the chat
ОтветитьHi yes I wanna do this but will I loose followers during time or not also as well do I need a vpn just in case ?
Ответить¡This is a really nice video! However, when trying to get the channel_id, my response is {'_total': 0, 'users': []}, so consequently I cannot get the channel_id. Do I have to wait some time for the application to be registered in the Twitch API? Or why is this problem happening?
ОтветитьHeyo,
overall q: must I use Python 3.8 or can I use 3.9 for the IC + IRC requests?
TLDR: I believe I got everything correct but the code keeps saying "requests not found" I double checked everything and in your git hub. It said to instal "py -3.8 -m pip irc requests" so I did, however, I got the error "Python 3.8 not found! "
I use 3.9.1, so I'm assuming I need 3.8 to use this or is there a newer version I could use for 3.9?
Thank you for your time!
Hey. Nice tutorial! I read the comments and saw that people had the same problem as me. I have checked everything several times and I do not understand where I am making a mistake.
Traceback (most recent call last):
File "C:\Users\...in <module>
bot = Bot()
File "C:\Users\...in _init_
self.channel_id = resp["users"][0]["_id"]
IndexError: list index out of range
Maybe something has changed since then? What should I check exactly? Can anyone help? Thank you in advance for your time.
Cheers!
this video is amazing, can I know how do I add this bot to other channels to ???
ОтветитьDoes this still work :/
ОтветитьHi, thanks for the tutorials, Just out of curiosity, is there a specific reason you chose to use the library, I'm thinking about using twitchio for my bot, is that a bad choice?
ОтветитьI have problem where I have all of the code in and when I run it I never get the "Now online." message sent in the chat. I did check's using prints and in the on_welcome def it makes it through all of the code in there but I never see a message in the chat so I was wondering what may be happening here
ОтветитьHow can I join more than one Channel?
ОтветитьWhat should come up in the console when I am running the code?
ОтветитьHey I'm not really into programming. How can I send a message defined in the code. Some thing like that: send_message(self, "hi")
ОтветитьIs it possible to make a bot which reads other people's chat, so I'm not the owner?
ОтветитьThank you very much for the tutorial!
I want to ask for help. The bot can't read colored messages written with /me. For example, if somebody write in the chat"/me doing something" bot don't see it. Is it possible to read these messages too?
What can a Twitch bot do?
ОтветитьLoving the tutorial so far but I can't get my bot to run. I've made sure my code looks exactly like yours (other than the NAME, token, etc.) but I'm not sure what's wrong.
ОтветитьDo you have to be live for it to work ? I tried debugging the "self.channel_id" part because I got a "list index out of range", and this is what "resp" printed me : {'_total':0,'user':[]}
EDIT : After some code tweaks, it appears that using my channel name in the "url" string instead of my bot name fetches something. And due to this, I see my own account send a message in the offline twitch chat, which isn't what's expected, right ?
Download link for the bot?
ОтветитьHey, where can i copy the copyright information ?
ОтветитьWhen I run mine I get the error:
File "my file thing", line 42, in <module>
bot = Bot()
File "my file thing", line 21, in _init_
self.channel_id = resp["users"][0]["_id"]
IndexError: list index out of range
It worked before with the NAME and OWNER of the ones shown in the vid but with mine, it isn't working.
To run on my own stream, what should I put for NAME and OWNER? my twitch id that I'm streaming on is Boom9er
A quick reply would be amazing. THANKS = True
So you cant connect to some random channel since you need to log in to the channel?
Guess I'll just go with js and use a twitch-irc node package which seems way more flexible and less complicated 😄
Great tutorial! I was wondering if the bot also works if I want it to enter another stream and listen to the chat.
Ответитьwhich is this app?
Ответить[Solved]
Howdy, I've tried to get your code to function and the init function executes properly but then nothing.
No error message, no program halt, no message in the stream chat - nothing.
I checked the resp response and it has all the expected info ({'_total': 1, 'users': [{'display_name': ...) so the issue seems to step from something later than that.
Any help or insight would be appreciated. Thanks for the help so far getting started.