{"id":17803399,"url":"https://github.com/sethwebster/twitterbot","last_synced_at":"2025-08-13T08:33:04.319Z","repository":{"id":2984023,"uuid":"3999997","full_name":"sethwebster/TwitterBot","owner":"sethwebster","description":null,"archived":false,"fork":false,"pushed_at":"2012-04-12T04:12:44.000Z","size":2674,"stargazers_count":5,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-27T13:18:42.093Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/sethwebster.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-04-12T00:51:16.000Z","updated_at":"2019-10-27T08:22:15.000Z","dependencies_parsed_at":"2022-08-30T23:01:35.737Z","dependency_job_id":null,"html_url":"https://github.com/sethwebster/TwitterBot","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/sethwebster%2FTwitterBot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sethwebster%2FTwitterBot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sethwebster%2FTwitterBot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sethwebster%2FTwitterBot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sethwebster","download_url":"https://codeload.github.com/sethwebster/TwitterBot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229751135,"owners_count":18118643,"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-10-27T12:46:40.597Z","updated_at":"2024-12-14T20:24:36.477Z","avatar_url":"https://github.com/sethwebster.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jabbot\n\nJabbot is a bot API for [JabbR](https://github.com/davidfowl/JabbR).\n\nWhy not write an apater for [Hubot](https://github.com/github/hubot)?\n\nI like writing C# :).\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 Sprokets\n\nSprokets are things you can plug-in to enhance the behavior of your bot. Simply drop a dll with classes that implement\nISproket into a Sprokets 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 MathSproket : RegexSproket\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```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsethwebster%2Ftwitterbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsethwebster%2Ftwitterbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsethwebster%2Ftwitterbot/lists"}