{"id":13409318,"url":"https://github.com/gempir/go-twitch-irc","last_synced_at":"2026-03-03T01:37:53.071Z","repository":{"id":19060276,"uuid":"85999605","full_name":"gempir/go-twitch-irc","owner":"gempir","description":"go irc client for twitch.tv","archived":false,"fork":false,"pushed_at":"2025-12-11T07:03:33.000Z","size":935,"stargazers_count":387,"open_issues_count":8,"forks_count":60,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-12-12T01:56:31.133Z","etag":null,"topics":["golang","hacktoberfest","irc","irc-client","tmi","twitch"],"latest_commit_sha":null,"homepage":"","language":"Go","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/gempir.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-03-23T21:31:35.000Z","updated_at":"2025-12-11T07:02:42.000Z","dependencies_parsed_at":"2024-06-18T12:41:00.201Z","dependency_job_id":"5be8e87a-1047-43a9-83c8-86207532fc13","html_url":"https://github.com/gempir/go-twitch-irc","commit_stats":{"total_commits":369,"total_committers":33,"mean_commits":"11.181818181818182","dds":0.7154471544715447,"last_synced_commit":"e01cb7b7c21f28057a0eddc14416887acd0cc7a3"},"previous_names":[],"tags_count":38,"template":false,"template_full_name":null,"purl":"pkg:github/gempir/go-twitch-irc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gempir%2Fgo-twitch-irc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gempir%2Fgo-twitch-irc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gempir%2Fgo-twitch-irc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gempir%2Fgo-twitch-irc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gempir","download_url":"https://codeload.github.com/gempir/go-twitch-irc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gempir%2Fgo-twitch-irc/sbom","scorecard":{"id":422053,"data":{"date":"2025-08-11","repo":{"name":"github.com/gempir/go-twitch-irc","commit":"31de9a32b6bca8834717a9b6e398e27d1bc08787"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":5,"reason":"Found 4/8 approved changesets -- score normalized to 5","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 1 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build.yml:1","Warn: no topLevel permission defined: .github/workflows/goveralls.yml:1","Warn: no topLevel permission defined: .github/workflows/lint.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":2,"reason":"dependency not pinned by hash detected -- score normalized to 2","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/gempir/go-twitch-irc/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/gempir/go-twitch-irc/build.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/goveralls.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/gempir/go-twitch-irc/goveralls.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/goveralls.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/gempir/go-twitch-irc/goveralls.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/goveralls.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/gempir/go-twitch-irc/goveralls.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/gempir/go-twitch-irc/lint.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/lint.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/gempir/go-twitch-irc/lint.yml/main?enable=pin","Info:   0 out of   5 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 third-party GitHubAction dependencies pinned","Info:   1 out of   1 goCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":3,"reason":"branch protection is not maximal on development and all release branches","details":["Info: 'allow deletion' disabled on branch 'main'","Info: 'force pushes' disabled on branch 'main'","Info: 'branch protection settings apply to administrators' is required to merge on branch 'main'","Warn: 'stale review dismissal' is disabled on branch 'main'","Warn: branch 'main' does not require approvers","Warn: codeowners review is not required on branch 'main'","Warn: 'last push approval' is disabled on branch 'main'","Warn: no status checks found to merge onto branch 'main'","Info: PRs are required in order to make changes on branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 28 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T01:28:38.049Z","repository_id":19060276,"created_at":"2025-08-19T01:28:38.049Z","updated_at":"2025-08-19T01:28:38.049Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30029705,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T00:31:48.536Z","status":"ssl_error","status_checked_at":"2026-03-03T00:30:56.176Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["golang","hacktoberfest","irc","irc-client","tmi","twitch"],"created_at":"2024-07-30T20:00:59.850Z","updated_at":"2026-03-03T01:37:53.048Z","avatar_url":"https://github.com/gempir.png","language":"Go","funding_links":[],"categories":["Bot Building","Bot建设","Libraries","机器人相关` 构建和使用机器人的库`","机器人相关","Uncategorized"],"sub_categories":["Golang","Contents","Free e-books"],"readme":"# go-twitch-irc [![Coverage Status](https://coveralls.io/repos/github/gempir/go-twitch-irc/badge.svg?branch=master)](https://coveralls.io/github/gempir/go-twitch-irc?branch=master)\n\nThis is an irc client for connecting to twitch. It handles the annoying stuff like irc tag parsing.\nI highly recommend reading the documentation below, but this readme gives a basic overview of the functionality.\n\nDocumentation: https://pkg.go.dev/github.com/gempir/go-twitch-irc/v4?tab=doc\n\n## Getting Started\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/gempir/go-twitch-irc/v4\"\n)\n\nfunc main() {\n\t// or client := twitch.NewAnonymousClient() for an anonymous user (no write capabilities)\n\tclient := twitch.NewClient(\"yourtwitchusername\", \"oauth:123123123\")\n\n\tclient.OnPrivateMessage(func(message twitch.PrivateMessage) {\n\t\tfmt.Println(message.Message)\n\t})\n\n\tclient.Join(\"gempir\")\n\n\terr := client.Connect()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n}\n```\n### Available Data\n\nThe twitch.User and MessageType structs reflect the data Twitch provides, minus any fields that have been marked as deprecated:\n```go\ntype User struct {\n\tID            string\n\tName          string\n\tDisplayName   string\n\tColor         string\n\tBadges        map[string]int\n\tIsBroadcaster bool\n\tIsMod         bool\n\tIsVip         bool\n}\n\ntype WhisperMessage struct {\n\tUser User\n\n\tRaw       string\n\tType      MessageType\n\tRawType   string\n\tTags      map[string]string\n\tMessage   string\n\tTarget    string\n\tMessageID string\n\tThreadID  string\n\tEmotes    []*Emote\n\tAction    bool\n}\n\ntype PrivateMessage struct {\n\tUser User\n\n\tRaw     string\n\tType    MessageType\n\tRawType string\n\tTags    map[string]string\n\tMessage string\n\tChannel string\n\tRoomID  string\n\tID      string\n\tTime    time.Time\n\tEmotes  []*Emote\n\tBits    int\n\tAction  bool\n}\n\ntype ClearChatMessage struct {\n\tRaw            string\n\tType           MessageType\n\tRawType        string\n\tTags           map[string]string\n\tMessage        string\n\tChannel        string\n\tRoomID         string\n\tTime           time.Time\n\tBanDuration    int\n\tTargetUserID   string\n\tTargetUsername string\n}\n\ntype ClearMessage struct {\n\tRaw         string\n\tType        MessageType\n\tRawType     string\n\tTags        map[string]string\n\tMessage     string\n\tChannel     string\n\tLogin       string\n\tTargetMsgID string\n}\n\ntype RoomStateMessage struct {\n\tRaw     string\n\tType    MessageType\n\tRawType string\n\tTags    map[string]string\n\tMessage string\n\tChannel string\n\tRoomID  string\n\tState   map[string]int\n}\n\ntype UserNoticeMessage struct {\n\tUser User\n\n\tRaw       string\n\tType      MessageType\n\tRawType   string\n\tTags      map[string]string\n\tMessage   string\n\tChannel   string\n\tRoomID    string\n\tID        string\n\tTime      time.Time\n\tEmotes    []*Emote\n\tMsgID     string\n\tMsgParams map[string]string\n\tSystemMsg string\n}\n\ntype UserStateMessage struct {\n\tUser User\n\n\tRaw       string\n\tType      MessageType\n\tRawType   string\n\tTags      map[string]string\n\tMessage   string\n\tChannel   string\n\tEmoteSets []string\n}\n\ntype GlobalUserStateMessage struct {\n\tUser User\n\n\tRaw       string\n\tType      MessageType\n\tRawType   string\n\tTags      map[string]string\n\tEmoteSets []string\n}\n\ntype NoticeMessage struct {\n\tRaw     string\n\tType    MessageType\n\tRawType string\n\tTags    map[string]string\n\tMessage string\n\tChannel string\n\tMsgID   string\n}\n\ntype UserJoinMessage struct {\n\t// Channel name\n\tChannel string\n\n\t// User name\n\tUser string\n}\n\ntype UserPartMessage struct {\n\t// Channel name\n\tChannel string\n\n\t// User name\n\tUser string\n}\n```\n\nFor unsupported message types, we return RawMessage:\n```go\ntype RawMessage struct {\n\tRaw     string\n\tType    MessageType\n\tRawType string\n\tTags    map[string]string\n\tMessage string\n}\n```\n\n### Available Methods\n\nParseMessage parses a raw Twitch IRC message into a User and a message object. User can be nil.\n\n```go\nfunc ParseMessage(line string) (*User, interface{})\n```\n\n### Client Methods\n\nThese are the available methods of the client so you can get your bot going:\n\n```go\nfunc (c *Client) Say(channel, text string)\nfunc (c *Client) Join(channel string)\nfunc (c *Client) Depart(channel string)\nfunc (c *Client) Userlist(channel string) ([]string, error)\nfunc (c *Client) Connect() error\nfunc (c *Client) Disconnect() error\nfunc (c *Client) Latency() (latency time.Duration, err error)\n```\n\n### Options\n\nOn your client you can configure multiple options:\n```go\nclient.IrcAddress = \"127.0.0.1:3030\" // for custom irc server\nclient.TLS = false // enabled by default, will connect to non TLS server of twitch when off or the given client.IrcAddress\nclient.SetupCmd = \"LOGIN custom_command_here\" // Send a custom command on successful IRC connection, before authentication.\nclient.Capabilities = []string{twitch.TagsCapability, twitch.CommandsCapability} // Customize which capabilities are sent\nclient.SetJoinRateLimiter(twitch.CreateVerifiedRateLimiter()) // If you have a verified bot or other needs use this to set a custom rate limiter\n```\n\nOption modifications must be done before calling Connect on the client.\n\n#### Capabilities\n\nBy default, the client sends along these capabilities ([Tags](https://dev.twitch.tv/docs/irc/tags), [Commands](https://dev.twitch.tv/docs/irc/commands)).  \n\n### Callbacks\n\nThese callbacks are available to pass to the client:\n```go\nclient.OnConnect(func() {})\nclient.OnPrivateMessage(func(message PrivateMessage) {})\nclient.OnWhisperMessage(func(message WhisperMessage) {})\nclient.OnClearChatMessage(func(message ClearChatMessage) {})\nclient.OnClearMessage(func(message ClearMessage) {})\nclient.OnRoomStateMessage(func(message RoomStateMessage) {})\nclient.OnUserNoticeMessage(func(message UserNoticeMessage) {})\nclient.OnUserStateMessage(func(message UserStateMessage) {})\nclient.OnGlobalUserStateMessage(func(message GlobalUserStateMessage) {})\nclient.OnNoticeMessage(func(message NoticeMessage) {})\nclient.OnUserJoinMessage(func(message UserJoinMessage) {})\nclient.OnUserPartMessage(func(message UserPartMessage) {})\nclient.OnSelfJoinMessage(func(message UserJoinMessage) {})\nclient.OnSelfPartMessage(func(message UserPartMessage) {})\n```\n\n### Message Types\n\nIf you ever need more than basic PRIVMSG, this might be for you.\nThese are the message types currently supported:\n\n    WHISPER\n    PRIVMSG\n    CLEARCHAT\n    CLEARMSG\n    ROOMSTATE\n    USERNOTICE\n    USERSTATE\n    GLOBALUSERSTATE\n    NOTICE\n    JOIN\n    PART\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgempir%2Fgo-twitch-irc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgempir%2Fgo-twitch-irc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgempir%2Fgo-twitch-irc/lists"}