Twitch
Twitch bots usually read and send chat messages and react to channel events.
- Reading chat and events: subscribe to EventSub (for example
channel.chat.message) over WebSocket or webhooks. The older IRC interface still works but Twitch recommends EventSub and the API for new bots. - Sending messages: call the Helix Send Chat Message endpoint with a user access token that has the right scopes, such as
user:write:chatanduser:bot. - Limits: a non-moderator account can send about 20 messages per 30 seconds per channel; moderators and broadcasters get more. See the rate limits table and the comparison tool.
- Good practice: give the bot its own account, ask the broadcaster to make it a moderator if it moderates, and avoid repeating messages.
Reddit bots use the Data API with OAuth.
- Register an app (script, web or installed type) and authenticate; unauthenticated scraping is not the way.
- Send a unique, descriptive User-Agent such as
platform:app-id:version (by u/yourname). Generic agents get throttled. - The free tier allows 100 queries per minute per OAuth client ID, averaged over 10 minutes. Read the
X-Ratelimit-*headers. - Respect each subreddit's rules. Many forbid bots unless moderators approve them. Libraries such as PRAW handle authentication and rate limiting.
X
The X API v2 has access tiers with different monthly post and read caps and per-endpoint rate limits.
- Posting requires OAuth 1.0a user context or OAuth 2.0 with PKCE and the right scopes.
- Automated accounts should be labeled as automated in account settings, and the automation rules prohibit things like bulk unsolicited mentions, duplicate content across accounts and automated likes.
- Check your plan's limits before designing features: some read endpoints are not available on lower tiers.
Shared principles
- Disclose that the account is a bot in its name or profile.
- Respond, do not broadcast: reply when called with a command or mention instead of posting unprompted.
- Back off on 429s and honor reset headers. See reliability and rate limits.
- Store less: keep IDs and the minimum state you need.
- Give moderators control: an off switch, a cooldown setting and a way to report problems.