My Discord server has been relying on a discord bot (see below) for a little while now, and I got the email about the api changing in September to v5 and was wondering if anyone here could help guide me through the process of updating to the new api.
My Javascript knowledge is passable at best; I have a old Twitch ClientID from before March, and I know that I need to change the Accept: "application/vnd.twitchtv.v3+json" to v5, but I’m unsure of what else I need to do; that alone doesn’t seem to work and the bot no longer posts notifications about streams going live anymore.
The ClientID and Discord bot token are passed as arguments when I run the bot.
How do I get the UserID? I can see the variable apiPath in the if / else statement, the only part I’m lacking right now is what to change for the apiPath; How do I get the IDs? Or do I just replace TwitchChannel.name.trim with TwitchChannel.id.trim ?
Your reply suggests you didn’t write the initial code, so you might have issues making all the changes. Since I’m not giving the full answer but links to the documentation so you can fix it yourself
You will need to either follow what the migration guide says
The code suggests that a command of !add username is run in discord. You’ll need to add code to take that username and convert it to a userID and store that along with the channelName
Yeah I didn’t write it; Basically our server isn’t being run by the owners properly, and somehow all of this stuff has been left to me to do, even though we have an experienced coder as another staff member, but he refuses to do anything. I’m trying to learn this as I go so our members aren’t suddenly left in the dark.
Thanks for the help so far, I’ll see if I can get it working.