{"id":28145916,"url":"https://github.com/zehsteam/twitchchatapi","last_synced_at":"2026-05-16T11:03:31.561Z","repository":{"id":270924479,"uuid":"907655667","full_name":"ZehsTeam/TwitchChatAPI","owner":"ZehsTeam","description":"Add Twitch chat integration to your Unity game mods! Subscribe to events like Messages, Cheers, Subs, and Raids. No Twitch authentication or connections required.","archived":false,"fork":false,"pushed_at":"2025-05-14T22:30:49.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-14T22:33:57.059Z","etag":null,"topics":["bepinex","mod","twitch","unity"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ZehsTeam.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"ko_fi":"zehsteam"}},"created_at":"2024-12-24T04:56:28.000Z","updated_at":"2025-05-14T22:30:53.000Z","dependencies_parsed_at":"2025-01-04T04:25:40.099Z","dependency_job_id":"e6fd78c1-bd85-46c3-9d6b-0c7363295727","html_url":"https://github.com/ZehsTeam/TwitchChatAPI","commit_stats":null,"previous_names":["zehsteam/lethal-company-twitchchatapi"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZehsTeam%2FTwitchChatAPI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZehsTeam%2FTwitchChatAPI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZehsTeam%2FTwitchChatAPI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZehsTeam%2FTwitchChatAPI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZehsTeam","download_url":"https://codeload.github.com/ZehsTeam/TwitchChatAPI/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254243355,"owners_count":22038046,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bepinex","mod","twitch","unity"],"created_at":"2025-05-14T23:11:39.760Z","updated_at":"2026-05-16T11:03:31.556Z","avatar_url":"https://github.com/ZehsTeam.png","language":"C#","funding_links":["https://ko-fi.com/zehsteam"],"categories":[],"sub_categories":[],"readme":"# TwitchChatAPI\n\n[![GitHub](https://img.shields.io/badge/GitHub-TwitchChatAPI-brightgreen?style=for-the-badge\u0026logo=GitHub)](https://github.com/ZehsTeam/TwitchChatAPI)\n[![Thunderstore Version](https://img.shields.io/thunderstore/v/Zehs/TwitchChatAPI?style=for-the-badge\u0026logo=thunderstore\u0026logoColor=white)](https://thunderstore.io/c/lethal-company/p/Zehs/TwitchChatAPI/)\n[![Thunderstore Downloads](https://img.shields.io/thunderstore/dt/Zehs/TwitchChatAPI?style=for-the-badge\u0026logo=thunderstore\u0026logoColor=white)](https://thunderstore.io/c/lethal-company/p/Zehs/TwitchChatAPI/)\n[![NuGet Version](https://img.shields.io/nuget/v/zehs.twitchchatapi?style=for-the-badge\u0026logo=nuget)](https://www.nuget.org/packages/Zehs.TwitchChatAPI)\n\n**Add Twitch chat integration to your Unity game mods! Subscribe to events like Messages, Cheers, Subs, and Raids. No Twitch authentication or connections required.**\n\n**\u003cins\u003eWho needs this mod installed for it to work?\u003c/ins\u003e Only you!**\n\n## API Usage\n\n\u003cdetails\u003e\u003csummary\u003eClick to Expand\u003c/summary\u003e\n\n\u003cbr\u003e\n\nReference TwitchChatAPI in your project's `.csproj` file.\n\nAdd TwitchChatAPI as a dependency to your plugin class.\n\n```cs\n[BepInDependency(TwitchChatAPI.MyPluginInfo.PLUGIN_GUID, BepInDependency.DependencyFlags.HardDependency)]\n```\n\n```cs\n[BepInPlugin(\"You.YourMod\", \"YourMod\", \"1.0.0\")]\n[BepInDependency(TwitchChatAPI.MyPluginInfo.PLUGIN_GUID, BepInDependency.DependencyFlags.HardDependency)]\npublic class YourMod : BaseUnityPlugin\n{\n    // ...\n}\n```\n\n### API\n\nhttps://github.com/ZehsTeam/TwitchChatAPI/blob/main/TwitchChatAPI/API.cs\n\n```cs\nnamespace TwitchChatAPI;\n\npublic static class API\n{\n    public static string Channel { get; }\n\n    public static ConnectionState ConnectionState { get; }\n    public static event Action\u003cConnectionState\u003e OnConnectionStateChanged;\n\n    public static event Action OnConnect;\n    public static event Action OnDisconnect;\n    public static event Action\u003cTwitchMessage\u003e OnMessage;\n    public static event Action\u003cTwitchCheerEvent\u003e OnCheer;\n    public static event Action\u003cTwitchSubEvent\u003e OnSub;\n    public static event Action\u003cTwitchRaidEvent\u003e OnRaid;\n    public static event Action\u003cTwitchRoomState\u003e OnRoomStateUpdate;\n\n    public static IReadOnlyCollection\u003cTwitchUser\u003e Users { get; }\n\n    public static void Connect();\n    public static void Connect(string channel);\n\n    public static void Disconnect();    \n\n    public static bool TryGetUserByUsername(string username, out TwitchUser twitchUser);\n    public static bool TryGetUserByUserId(string userId, out TwitchUser twitchUser);\n    public static TwitchUser[] GetUsersSeenWithin(TimeSpan timeSpan);\n}\n```\n\n### TwitchUser\n\nhttps://github.com/ZehsTeam/TwitchChatAPI/blob/main/TwitchChatAPI/Objects/TwitchUser.cs\n\n### TwitchMessage\n\nhttps://github.com/ZehsTeam/TwitchChatAPI/blob/main/TwitchChatAPI/Objects/TwitchMessage.cs\n\n### TwitchEvents (Cheer, Sub, Raid)\n\nhttps://github.com/ZehsTeam/TwitchChatAPI/blob/main/TwitchChatAPI/Objects/TwitchEvents.cs\n\n### Example\n\n```cs\nusing TwitchChatAPI;\nusing TwitchChatAPI.Enums;\nusing TwitchChatAPI.Objects;\nusing UnityEngine;\n\npublic class TwitchChatExample : MonoBehaviour\n{\n    private void OnEnable()\n    {\n        // Subscribe to Twitch events\n        API.OnMessage += HandleMessage;\n        API.OnCheer += HandleCheer;\n        API.OnSub += HandleSub;\n        API.OnRaid += HandleRaid;\n    }\n\n    private void OnDisable()\n    {\n        // Unsubscribe to avoid memory leaks\n        API.OnMessage -= HandleMessage;\n        API.OnCheer -= HandleCheer;\n        API.OnSub -= HandleSub;\n        API.OnRaid -= HandleRaid;\n    }\n\n    private void HandleMessage(TwitchMessage message)\n    {\n        Debug.Log($\"[{message.User.DisplayName}]: {message.Message}\");\n    }\n\n    private void HandleCheer(TwitchCheerEvent cheer)\n    {\n        Debug.Log($\"{cheer.User.DisplayName} cheered {cheer.CheerAmount} bits!\");\n    }\n\n    private void HandleSub(TwitchSubEvent sub)\n    {\n        //...\n    }\n\n    private void HandleRaid(TwitchRaidEvent raid)\n    {\n        Debug.Log($\"Raid incoming! {raid.User.DisplayName} is raiding with {raid.ViewerCount} viewers!\");\n    }\n}\n```\n\n\u003c/details\u003e\n\n## Developer Contact\n\n**Report bugs, suggest features, or provide feedback:**\n\n| **Discord Server** | **Forum** | **Post** |  \n|--------------------|-----------|----------|  \n| [Lethal Company Modding](https://discord.gg/XeyYqRdRGC) | `#mod-releases` | [TwitchChatAPI](https://discord.com/channels/1168655651455639582/1324949317030772838) |  \n| [Unofficial Lethal Company Community](https://discord.gg/nYcQFEpXfU) | `#mod-releases` | [TwitchChatAPI](https://discord.com/channels/1169792572382773318/1324949327453356145) |  \n| [R.E.P.O. Modding Server](https://discord.com/invite/vPJtKhYAFe) | `#released-mods` | [TwitchChatAPI](https://discord.com/channels/1344557689979670578/1373837610832629842) |  \n\n- **GitHub Issues Page:** [TwitchChatAPI](https://github.com/ZehsTeam/TwitchChatAPI/issues)\n- **My Links:** https://solo.to/crithaxxog\n\n[\u003cimg src=\"https://i.imgur.com/duJZQTS.png\" width=\"200px\"\u003e](https://ko-fi.com/zehsteam)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzehsteam%2Ftwitchchatapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzehsteam%2Ftwitchchatapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzehsteam%2Ftwitchchatapi/lists"}