{"id":20072376,"url":"https://github.com/markolson/linkbot","last_synced_at":"2025-05-05T20:33:19.461Z","repository":{"id":4577443,"uuid":"1348491","full_name":"markolson/linkbot","owner":"markolson","description":"pluggable ruby chatbot for slack (and others)","archived":false,"fork":false,"pushed_at":"2023-03-17T05:29:10.000Z","size":652,"stargazers_count":27,"open_issues_count":9,"forks_count":19,"subscribers_count":8,"default_branch":"master","last_synced_at":"2023-04-11T01:26:40.961Z","etag":null,"topics":[],"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/markolson.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,"governance":null}},"created_at":"2011-02-09T22:44:39.000Z","updated_at":"2023-07-05T15:40:27.867Z","dependencies_parsed_at":"2023-07-10T06:16:43.140Z","dependency_job_id":null,"html_url":"https://github.com/markolson/linkbot","commit_stats":null,"previous_names":[],"tags_count":7,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markolson%2Flinkbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markolson%2Flinkbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markolson%2Flinkbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markolson%2Flinkbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markolson","download_url":"https://codeload.github.com/markolson/linkbot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224468328,"owners_count":17316355,"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":[],"created_at":"2024-11-13T14:39:45.666Z","updated_at":"2024-11-13T14:39:46.380Z","avatar_url":"https://github.com/markolson.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Linkbot\n\n[![Build Status](https://travis-ci.org/markolson/linkbot.svg)](https://travis-ci.org/markolson/linkbot)\n\nLinkbot is a ruby chatbot designed to sit in your chat room and provide\ninteresting/fun/useful responses to your queries. It has an easy-to-use\nplugin system and many plugins already written.\n\n## Installation\n\nMake sure you have ruby 2.7 or greater, rubygems, and bundler installed.\n\nThen,\n\n```\ngit clone https://github.com/markolson/linkbot.git\ncd linkbot\nbundle install\n```\n\nThat should set you up with linkbot and all its dependencies.\n\nNext, copy `config.example.json` into `./tmp/config.json`, and set the\nappropriate variables. You must fill in the `connectors` field with appropriate\nconnection information, but feel free to add or delete entries from the `plugins`\nsection for plugins you don't want. KEEP the `plugins` section, though, even if\nit is empty.\n\n(TODO: more on this, refactor config)\n\nFinally, run `linkbot --config ./tmp/config.json --database ./tmp/data.sqlite3`\nto run linkbot.\n\n## Connectors\n\nConnectors are the interface for linkbot to connect with your chat service.\nCurrently, linkbot has jabber, campfire, slack, and irc connectors, though\nyou should really only use the Slack connector.\n\n## Plugins\n\nPlugins are the bits that make linkbot useful. Each plugin implements a command\nthat linkbot knows how to respond to. A basic plugin inherits from `Linkbot::Plugin`,\nand registers a regex to match against in the initializer. Matches are passed\ninto `on_message`, which should return a string.\n\n```\nclass Slap \u003c Linkbot::Plugin\n  def initialize\n    register :regex =\u003e /\\/slap(?: ([\\w\\s]+))?/\n    help \"/slap [username] - Flashback to the halcyon days of the 1990s when hammer pants were all the rage\"\n  end\n\n  def on_message(message, matches)\n    user = (matches[0] and matches[0].length \u003e 0) ? matches[0] : \"everyone\"\n    \"#{message.user_name} slaps #{user} around a bit with a large trout\"\n  end\nend\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkolson%2Flinkbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkolson%2Flinkbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkolson%2Flinkbot/lists"}