{"id":26652435,"url":"https://github.com/ilotterytea/bot","last_synced_at":"2025-09-04T19:23:34.898Z","repository":{"id":36982402,"uuid":"472406784","full_name":"ilotterytea/bot","owner":"ilotterytea","description":"ilotterytea's twitch bot.","archived":false,"fork":false,"pushed_at":"2025-01-22T22:13:15.000Z","size":9776,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-11T06:02:36.346Z","etag":null,"topics":["7tv","bot","chatbot","handlebars","insane","java","twitch","twitch4j","websocket"],"latest_commit_sha":null,"homepage":"https://bot.ilotterytea.kz","language":"Java","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ilotterytea.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}},"created_at":"2022-03-21T15:50:01.000Z","updated_at":"2025-01-22T22:21:43.000Z","dependencies_parsed_at":"2024-08-06T00:30:20.709Z","dependency_job_id":"55beb978-d2fc-4798-80a1-b84b17368efc","html_url":"https://github.com/ilotterytea/bot","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilotterytea%2Fbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilotterytea%2Fbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilotterytea%2Fbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ilotterytea%2Fbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ilotterytea","download_url":"https://codeload.github.com/ilotterytea/bot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248351380,"owners_count":21089270,"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":["7tv","bot","chatbot","handlebars","insane","java","twitch","twitch4j","websocket"],"created_at":"2025-03-25T03:56:57.077Z","updated_at":"2025-09-04T19:23:34.885Z","avatar_url":"https://github.com/ilotterytea.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ilotterytea's rustpilled bot\n\nA utility and entertainment multi-chat Twitch bot.\n\n## Features\n\n+ Listening to the stream start/end and notifying chatters.\n+ Sending messages in intervals *(like timers)*\n+ PostgreSQL database support\n+ Ping all chatters with a message *(massping)*\n+ Running user-created Lua scripts\n+ Counting emote usage. [More...](#more-about-emote-usage-counting)\n\n## Prerequisites\n\n+ Rust compiler\n+ PostgreSQL\n+ Diesel CLI `(cargo install diesel_cli --no-default-features -F postgres)`\n\n## Installation guide\n\n1. Install all prerequisites.\n2. Clone the repository from the desired source and open it in the terminal.\n3. [Create a configuration file *(rustpilled_bot.toml)*](#rustpilled_bottoml-example-with-all-available-parameters)\n4. Applying database migration: `diesel migration run --database-url \"postgres://user:pass@host/name\"`\n\n5. Run the bot\n\n+ Twitch bot: `cargo run --release --package bot`\n+ API: `cargo run --release --package api`\n\n### rustpilled_bot.toml example with all available variables\n\n```toml\n[database]\nurl = \"postgres://user:pass@host/name\"\n\n[bot]\nusername = \"YYYYYY\"\npassword = \"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\"\nowner_twitch_id = 123456789 # optional, can be used by some commands to access superuser subcommands.\nclient_id = \"ABCDEF\" # optional, used by web auth.\nclient_secret = \"FEDCBA\"  # optional, used by web auth.\nredirect_uri = \"ACEBDF\"  # optional, used by web auth.\n\n[web]\nport = 8080 # optional\ncontact_name = \"forsen\" # optional\ncontact_url = \"https://twitch.tv/forsen\" # optional\nbot_title = \"forsen's twitch bot\" # optional\n\n[commands]\ndefault_prefix = \"!\" # optional\ndefault_language = \"english\" # optional\n\n[commands.spam]\nmax_count = 50 # optional, maximum number of lines that !spam can send at a time\n\n[third_party]\ndocs_url = \"https://forsen.tv/wiki\" # optional, this is base url for command reference\nstats_api_url = \"https://stats.forsen.tv\" # optional\nstats_api_password = \"TZULQS\" # optional, required if you want to join your channels there.\npastea_api_url = \"https://paste.forsen.tv\" # optional\npastea_api_password = \"ASDASD\" # optional, can be used by !chatters to post authorized pastes, otherwise they will be “posted by anonymous”.\n```\n\n\u003e You must generate an OAuth2 password from [TwitchTokenGenerator with special scopes](https://twitchtokengenerator.com/quick/riIPG7o2Fd) for bot, because this password is used not only for chat communication, but also for commands that use Twitch API endpoints that can only be accessed with special permissions *(for example, !massping requires moderator:read:chatters)*.\n\n### More about emote usage counting\n\nYou can use [standard instance of \"ilotterytea/stats\"](https://stats.ilotterytea.kz), but you will only be able to get statistics from channels that [teabot] has joined. If you want to join your own channels, you need to [deploy your own instance of \"ilotterytea/stats\"](https://github.com/ilotterytea/stats) and set the `stats_api_url` and `stats_api_password` variables in the `rustpilled_bot.toml` file.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filotterytea%2Fbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Filotterytea%2Fbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Filotterytea%2Fbot/lists"}