{"id":20900766,"url":"https://github.com/code52/jibbr","last_synced_at":"2025-05-13T02:30:28.635Z","repository":{"id":2186708,"uuid":"3134382","full_name":"Code52/jibbr","owner":"Code52","description":"A Jabbr bot designed for collaborative projects","archived":false,"fork":false,"pushed_at":"2022-06-30T19:54:15.000Z","size":7752,"stargazers_count":68,"open_issues_count":27,"forks_count":27,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-01T15:21:39.332Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"code52.org","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Code52.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-01-09T05:55:50.000Z","updated_at":"2025-03-09T18:49:20.000Z","dependencies_parsed_at":"2022-08-31T01:11:23.379Z","dependency_job_id":null,"html_url":"https://github.com/Code52/jibbr","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/Code52%2Fjibbr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code52%2Fjibbr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code52%2Fjibbr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Code52%2Fjibbr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Code52","download_url":"https://codeload.github.com/Code52/jibbr/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253859325,"owners_count":21975078,"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-18T11:22:32.205Z","updated_at":"2025-05-13T02:30:26.983Z","avatar_url":"https://github.com/Code52.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"## JibbR\n\n### A Jabbr bot designed for collaborative projects\n\nExtending the Jabbot library - a bot API for [JabbR](https://github.com/davidfowl/JabbR).\n\n## Connecting to a Jabbr Room\n\nIt's as easy as:\n\n```csharp\nvar bot = new Bot(\"http://myjabbot\", \"username\", \"password\");\nbot.PowerUp();\nbot.Join(\"someroom\");\nbot.Say(\"Hello\", \"someroom\");\nbot.Say(\"Ok I'm off\");\nbot.ShutDown();\n```\n\n\n## Writing Sprockets\n\nSprockets are things you can plug-in to enhance the behavior of your bot. Simply drop a dll with classes that implement\nISprocket into a Sprockets folder and you're done. Here's an port of the [math.coffee](https://github.com/github/hubot/blob/master/src/scripts/math.coffee) from hubot:\n\n```csharp\npublic class MathSprocket : RegexSprocket\n{\n    public override Regex Pattern\n    {\n        get { return new Regex(\"(calc|calculate|convert|math)( me)? (.*)\"); }\n    }\n\n    protected override void ProcessMatch(Match match, ChatMessage message, Bot bot)\n    {\n        var client = new HttpClient();\n        client.DefaultRequestHeaders.AcceptLanguage.Add(new StringWithQualityHeaderValue(\"en-us\"));\n        client.DefaultRequestHeaders.AcceptCharset.Add(new StringWithQualityHeaderValue(\"utf-8\"));\n\n        client.GetAsync(\"http://www.google.com/ig/calculator?hl=en\u0026q=\" + Uri.EscapeDataString(match.Groups[3].Value))\n              .ContinueWith(task =\u003e\n              {\n                  if (task.Result.IsSuccessStatusCode)\n                  {\n                      task.Result.Content.ReadAsStringAsync().ContinueWith(readTask =\u003e\n                      {\n                          dynamic json =  JsonConvert.DeserializeObject(readTask.Result);\n\n                          string solution = json.rhs;\n\n                          bot.Reply(message.FromUser, solution ?? \"Could not compute.\", message.Room);\n                      });\n                  }\n              });\n    }\n}\n```\n\nA new extension being added to JibbR is for announcement-style sprockets. You can specify how often an announcement may occur, and include code to execute for the active bot.\n\n```csharp\npublic class EchoAnnouncement : IAnnounce\n{\n    public TimeSpan Interval\n    {\n        get { return TimeSpan.FromMinutes(10); }\n    }\n\n    public void Execute(Bot bot)\n    {\n        foreach (var room in bot.Rooms)\n        {\n            bot.Say(\"Hello world!\", room);\n        }\n    }\n}\n```\n\n### another code52 project\n\n#### code52.org\n\n=======\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode52%2Fjibbr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcode52%2Fjibbr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcode52%2Fjibbr/lists"}