DEV Community

Discussion on: Let's make a Twitch bot with Python!

Collapse
 
restingbeardface profile image
RestingBeardFace

Hey there, I just found this now and am trying to get it to work. I am getting an error: TypeError: Bot.init() missing 1 required positional argument: 'token'

I have seen a couple of the posts / people experiencing it and have tried some of the comments associated on the chain but been unable to fix, please help!

Collapse
 
doctorpizzamd profile image
DoctorPizzaMD • Edited

Inside your bot = commands.Bot() function the "tmi_token" variable needs to be changed to "token". My guess is that twitchio probably changed something since this post was made, seeing as it's a couple years old at this point. But this is just a guess.

The commands.Bot() function call is expecting the "token" argument to be present, and since it's not, due to the instructions saying "tmi_token" the call is failing.

Edit: I'm trying to upload an image, but it's not letting me.

It should look like this: imgur.com/oaAMC1t