{"id":15519830,"url":"https://github.com/tomaarsen/twitchsavemessages","last_synced_at":"2025-10-14T17:32:29.975Z","repository":{"id":109767127,"uuid":"179078156","full_name":"tomaarsen/TwitchSaveMessages","owner":"tomaarsen","description":"Twitch bot to save API information from chat messages and more in a database.","archived":false,"fork":false,"pushed_at":"2020-04-06T09:50:41.000Z","size":21,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-23T04:45:44.331Z","etag":null,"topics":["bot","python","twitch","twitch-bot","twitchbot"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/tomaarsen.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}},"created_at":"2019-04-02T12:57:08.000Z","updated_at":"2024-05-10T19:59:38.000Z","dependencies_parsed_at":"2023-03-13T05:45:41.854Z","dependency_job_id":null,"html_url":"https://github.com/tomaarsen/TwitchSaveMessages","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tomaarsen/TwitchSaveMessages","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomaarsen%2FTwitchSaveMessages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomaarsen%2FTwitchSaveMessages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomaarsen%2FTwitchSaveMessages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomaarsen%2FTwitchSaveMessages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomaarsen","download_url":"https://codeload.github.com/tomaarsen/TwitchSaveMessages/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomaarsen%2FTwitchSaveMessages/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279020074,"owners_count":26086806,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["bot","python","twitch","twitch-bot","twitchbot"],"created_at":"2024-10-02T10:23:02.805Z","updated_at":"2025-10-14T17:32:29.945Z","avatar_url":"https://github.com/tomaarsen.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TwitchSaveMessages\nTwitch bot to save API information from chat messages and more in a database.\n\n---\n# Explanation\nWhen the bot has started, it will start listening to chat messages in the channel listed in the settings.txt file. Beyond that, it listens to all other data Twitch sends us, and depending on our settings, stores it into a .db file. \u003cb\u003eThis is meant for debugging purposes only.\u003c/b\u003e Data is not stored efficiently.\n\n---\n# Database structure\n\n| **Column**        | **Meaning** | \n| -------------------- | ----------- |\n| full_message | Raw data from Twitch. |\n| tags | All tags. These give information about a user, generally. Potentially empty | \n| command | The full command. |\n| user | The user connected to the command. Optional. |\n| type | The type of command. Important. |\n| params | Parameters sent along with the command. Optional. |\n| channel | The channel this command is sent in. Optional | \n| message | The message sent along. Optional. | \n| time | (Unix Epoch) Time at which the message was generated. |\n| time_since_last | Time since previous message. | \n\nMore information on the database structure [here](https://github.com/CubieDev/TwitchWebsocket), in the Output section.\n\n---\n\n# Settings\nThis bot is controlled by a settings.txt file, which looks like:\n```\n{\n    \"Host\": \"irc.chat.twitch.tv\",\n    \"Port\": 6667,\n    \"Channel\": \"#\u003cchannel\u003e\",\n    \"Nickname\": \"\u003cname\u003e\",\n    \"Authentication\": \"oauth:\u003cauth\u003e\",\n    \"MessagesOnly\": false\n}\n```\n\n| **Parameter**        | **Meaning** | **Example** |\n| -------------------- | ----------- | ----------- |\n| Host                 | The URL that will be used. Do not change.                         | \"irc.chat.twitch.tv\" |\n| Port                 | The Port that will be used. Do not change.                        | 6667 |\n| Channel              | The Channel that will be connected to.                            | \"#CubieDev\" |\n| Nickname             | The Username of the bot account.                                  | \"CubieB0T\" |\n| Authentication       | The OAuth token for the bot account.                              | \"oauth:pivogip8ybletucqdz4pkhag6itbax\" |\n| MessagesOnly         | Whether only chat messages should be stored. If false, messages like subscriptions, hosts, joins, parts, etc. will also be stored. | false |\n\n*Note that the example OAuth token is not an actual token, but merely a generated string to give an indication what it might look like.*\n\nI got my real OAuth token from https://twitchapps.com/tmi/.\n\n---\n\n# Requirements\n* [Python 3.6+](https://www.python.org/downloads/)\n* [Module requirements](requirements.txt)\u003cbr\u003e\nInstall these modules using `pip install -r requirements.txt`\n\nAmong these modules is my own [TwitchWebsocket](https://github.com/CubieDev/TwitchWebsocket) wrapper, which makes making a Twitch chat bot a lot easier.\nThis repository can be seen as an implementation using this wrapper.\n\n---\n\n# Other Twitch Bots\n\n* [TwitchMarkovChain](https://github.com/CubieDev/TwitchMarkovChain)\n* [TwitchAIDungeon](https://github.com/CubieDev/TwitchAIDungeon)\n* [TwitchGoogleTranslate](https://github.com/CubieDev/TwitchGoogleTranslate)\n* [TwitchCubieBotGUI](https://github.com/CubieDev/TwitchCubieBotGUI)\n* [TwitchCubieBot](https://github.com/CubieDev/TwitchCubieBot)\n* [TwitchRandomRecipe](https://github.com/CubieDev/TwitchRandomRecipe)\n* [TwitchUrbanDictionary](https://github.com/CubieDev/TwitchUrbanDictionary)\n* [TwitchRhymeBot](https://github.com/CubieDev/TwitchRhymeBot)\n* [TwitchWeather](https://github.com/CubieDev/TwitchWeather)\n* [TwitchDeathCounter](https://github.com/CubieDev/TwitchDeathCounter)\n* [TwitchSuggestDinner](https://github.com/CubieDev/TwitchSuggestDinner)\n* [TwitchPickUser](https://github.com/CubieDev/TwitchPickUser)\n* [TwitchSaveMessages](https://github.com/CubieDev/TwitchSaveMessages)\n* [TwitchMMLevelPickerGUI](https://github.com/CubieDev/TwitchMMLevelPickerGUI) (Mario Maker 2 specific bot)\n* [TwitchMMLevelQueueGUI](https://github.com/CubieDev/TwitchMMLevelQueueGUI) (Mario Maker 2 specific bot)\n* [TwitchPackCounter](https://github.com/CubieDev/TwitchPackCounter) (Streamer specific bot)\n* [TwitchDialCheck](https://github.com/CubieDev/TwitchDialCheck) (Streamer specific bot)\n* [TwitchSendMessage](https://github.com/CubieDev/TwitchSendMessage) (Meant for debugging purposes)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomaarsen%2Ftwitchsavemessages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomaarsen%2Ftwitchsavemessages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomaarsen%2Ftwitchsavemessages/lists"}