Python - Bot keeps crashing

I made a small Python chatbot that will respond to a certain set of commands.

But if no one uses the bot for a while, it crashes.

I know that the IRC sends a PING when checking if the bot is active.
But how do I respond to it?


first of all do not include your oauth token anywhere public.

To keep the connection alive, respond to any PING you get with PONG. Relevant documentation.

@MonsieurErin: Please remove your OAuth token from that bin. I remove the bin for now.

Sorry. but it was for the bot account. It wasn’t my real Twitch account.

Regardless, it would allow anyone to take over your bot’s chat use (and possibly more, if the token has more scopes) and people doing that generally aren’t very nice about it.

@MonsieurErin Two things: First, please remove the porn link. I’ve removed the bin until that is taken care of.

Second, tokens are to be treated as confidential and secure. You are responsible for anything that happens using your OAuth token as outlined in the Developer Accounts & Keys section of our API ToS. A bad actor could do a lot of things on your behalf depending on the scopes attached to that token. :slight_smile:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.