{"id":13338837,"url":"https://github.com/tomaarsen/TwitchCubieBot","last_synced_at":"2025-03-11T10:32:06.673Z","repository":{"id":109767054,"uuid":"179069165","full_name":"tomaarsen/TwitchCubieBot","owner":"tomaarsen","description":"Twitch Bot focusing on aggregating votes and averages from Twitch chat","archived":false,"fork":false,"pushed_at":"2021-05-11T18:32:55.000Z","size":54,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-08T09:13:23.381Z","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:05:01.000Z","updated_at":"2023-01-20T01:06:04.000Z","dependencies_parsed_at":"2023-06-11T15:00:30.709Z","dependency_job_id":null,"html_url":"https://github.com/tomaarsen/TwitchCubieBot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomaarsen%2FTwitchCubieBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomaarsen%2FTwitchCubieBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomaarsen%2FTwitchCubieBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomaarsen%2FTwitchCubieBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomaarsen","download_url":"https://codeload.github.com/tomaarsen/TwitchCubieBot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243015487,"owners_count":20222086,"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":["bot","python","twitch","twitch-bot","twitchbot"],"created_at":"2024-07-29T19:17:22.358Z","updated_at":"2025-03-11T10:32:06.652Z","avatar_url":"https://github.com/tomaarsen.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TwitchCubieBot\nTwitch Bot focusing on aggregating votes and averages from Twitch chat\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. All messages will be parsed, and votes and numbers will be stored for 3 minutes after the messages comes in.\nIf at some point someone decides to calculate a vote or average, the information from the last 3 minutes will be used. \u003cb\u003eThis means it is not needed to start a vote or average in advance\u003c/b\u003e Note that if one user sends multiple votes or multiple values, newer values will override the older ones, so everyone only has one vote.\n\n**Note that this bot now has a new version with a GUI: [TwitchCubieBotGUI](https://github.com/CubieDev/TwitchCubieBotGUI)**\n\n---\n# Voting\nCommands:\n\u003cpre\u003e\n\u003cb\u003e!vote\u003c/b\u003e\n\u003c/pre\u003e\nThis command will decide the winner between votes.\n\u003cpre\u003e\n\u003cb\u003e!vote numbers\u003c/b\u003e\n\u003c/pre\u003e\nThis command will decide the winner between numbers.\n\u003cpre\u003e\n\u003cb\u003e!vote emotes\u003c/b\u003e\n\u003c/pre\u003e\nThis command will decide the winner between emotes.\n\nValid votes (for A) include:\n* A\n* AAAAA\n* A A A\n* A Please\n* All of the above, but with lower case a\n\nInvalid votes include:\n* I would really like that\n* D I A L\n\nAny single letter can be a vote.\n\n---\n\n# Averaging\nCommand:\n\u003cpre\u003e\n\u003cb\u003e!average\u003c/b\u003e\n\u003c/pre\u003e\nThis command will average (median) all numbers sent in the last `LookbackTime` seconds. See [Settings](#settings) for information on how to configure `LookbackTime`.\n\n---\n# Examples\n\nThe logging and chat output when `!vote` was typed by someone with the appropriate rank:\n\u003cpre\u003e\n\u003cb\u003eB won with 74.24%.\u003c/b\u003e\n\u003c/pre\u003e\nThe logging and chat output when `!vote numbers` was typed by someone with the appropriate rank:\n\u003cpre\u003e\n\u003cb\u003e3.0 won with 84.72%.\u003c/b\u003e\n\u003c/pre\u003e\n\nThe logging and chat output when `!average` was typed by someone with the appropriate rank:\n\u003cpre\u003e\n\u003cb\u003eThe average is 67.38.\u003c/b\u003e\n\u003c/pre\u003e\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    \"DeniedUsers\": [\n        \"streamelements\",\n        \"marbiebot\",\n        \"moobot\"\n    ],\n    \"AllowedRanks\": [\n        \"broadcaster\",\n        \"moderator\"\n    ],\n    \"AllowedPeople\": [],\n    \"LookbackTime\": 30\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| DeniedUsers     | List of (bot) names who's messages will not be included in voting and averages. | [\"streamelements\", \"marbiebot\", \"moobot\"] |\n| AllowedRanks  | List of ranks required to be able to perform the commands. | [\"broadcaster\", \"moderator\"] |\n| AllowedPeople | List of users who, even if they don't have the right ranks, will be allowed to perform the commands. | [\"cubiedev\"] |\n| LookbackTime | The amount of seconds the bot looks back for votes/numbers/emotes. | 30 |\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%2FTwitchCubieBot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomaarsen%2FTwitchCubieBot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomaarsen%2FTwitchCubieBot/lists"}