Skip to content

Instantly share code, notes, and snippets.

View BarryCarlyon's full-sized avatar
:octocat:
I'll sleep when I'm dead

Barry Carlyon BarryCarlyon

:octocat:
I'll sleep when I'm dead
View GitHub Profile
/*
https://dev.twitch.tv/docs/chat/chatbot-guide/
*/
import WebSocket from 'ws';
const OAUTH_TOKEN = 'CHANGE_ME_TO_YOUR_OAUTH_TOKEN'; // Needs scopes user:bot, user:read:chat, user:write:chat
const CHAT_CHANNEL_USER_ID = 'CHANGE_ME_TO_THE_CHAT_CHANNELS_USER_ID'; // This is the User ID of the channel that the bot will join and listen to chat messages of