{"id":13758539,"url":"https://github.com/craysiii/twitchbot","last_synced_at":"2025-05-10T08:30:31.534Z","repository":{"id":55389564,"uuid":"222876820","full_name":"craysiii/twitchbot","owner":"craysiii","description":null,"archived":false,"fork":false,"pushed_at":"2021-01-03T23:39:11.000Z","size":46,"stargazers_count":5,"open_issues_count":8,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-06T10:57:06.968Z","etag":null,"topics":["bot","chat","eventmachine","ruby","twitch","twitchbot","websocket"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/craysiii.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-20T07:28:22.000Z","updated_at":"2024-12-27T18:39:47.000Z","dependencies_parsed_at":"2022-08-14T23:10:42.026Z","dependency_job_id":null,"html_url":"https://github.com/craysiii/twitchbot","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/craysiii%2Ftwitchbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craysiii%2Ftwitchbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craysiii%2Ftwitchbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craysiii%2Ftwitchbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/craysiii","download_url":"https://codeload.github.com/craysiii/twitchbot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253389430,"owners_count":21900760,"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","chat","eventmachine","ruby","twitch","twitchbot","websocket"],"created_at":"2024-08-03T13:00:32.031Z","updated_at":"2025-05-10T08:30:31.192Z","avatar_url":"https://github.com/craysiii.png","language":"Ruby","funding_links":[],"categories":["Libraries"],"sub_categories":["Ruby"],"readme":"# Twitchbot\n\nA plugin-based framework for creating Twitch chat bots, written in Ruby and based on `EventMachine` and `Faye::WebSocket`.\n\nNotes:\n* Plugins are first class citizens\n* Helper functions implemented to gate-keep commands\n* Bot can currently only join one channel (it might stay that way)\n* Read the source until I get all the documentation completed\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'twitchbot'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install twitchbot\n\n## Getting Started\n\nRequire Twitchbot\n\n    require 'twitchbot'\n    \nCreate Plugins\n\n    # MessagePlugin, which listens for the registered command preceeded by the Bot command_prefix\n    class HiPlugin\n      include Twitchbot::MessagePlugin\n    \n      register command: 'hi', method: :say_hi\n    \n      def say_hi(message, arg)\n        message.respond 'Hello world!'\n      end\n    end\n    \n    # TimedPlugin, which fires off the registered command periodically\n    class ShoutOutPlugin\n      include Twitchbot::TimedPlugin\n    \n      register method: :social, interval: 15 # Time in seconds\n    \n      def social(handler)\n        handler.send_channel('Hello! Check my social media out!')\n      end\n    end\n    \n    # Plugin, which listens for registered commands according to the raw IRC command\n    class PutsPlugin\n        include Twitchbot::Plugin\n        \n        register command: 'PRIVMSG', method: :put_string\n        \n        def put_string(handler)\n            handler.messages.each do |message|\n                puts message\n            end\n        end\n    end\n    \nCreate and start `Bot`\n\n    bot = Twitchbot::Bot.new do |bot|\n      bot.username = 'bot_name'\n      bot.password = 'oauth:password'\n      bot.channel = 'channel_name'\n      bot.plugins = [HiPlugin, ShoutOutPlugin, PutsPlugin]\n      bot.debug = true\n      # bot.command_prefix = '$' # Default is '!'\n    end\n    \n    bot.start\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/craysiii/twitchbot.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcraysiii%2Ftwitchbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcraysiii%2Ftwitchbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcraysiii%2Ftwitchbot/lists"}