{"id":31621039,"url":"https://github.com/premshree/lib-slackbot","last_synced_at":"2026-04-21T09:32:39.552Z","repository":{"id":122326402,"uuid":"98582736","full_name":"premshree/lib-slackbot","owner":"premshree","description":"A thin library to make writing slackbot commands super simple","archived":false,"fork":false,"pushed_at":"2017-08-04T01:01:56.000Z","size":72,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-06T15:51:33.761Z","etag":null,"topics":["golang","productivity","slack","slackbot"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/premshree.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-07-27T21:53:30.000Z","updated_at":"2017-07-31T21:48:26.000Z","dependencies_parsed_at":"2023-05-10T14:03:08.257Z","dependency_job_id":null,"html_url":"https://github.com/premshree/lib-slackbot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/premshree/lib-slackbot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/premshree%2Flib-slackbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/premshree%2Flib-slackbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/premshree%2Flib-slackbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/premshree%2Flib-slackbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/premshree","download_url":"https://codeload.github.com/premshree/lib-slackbot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/premshree%2Flib-slackbot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32085477,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T06:27:27.065Z","status":"ssl_error","status_checked_at":"2026-04-21T06:27:21.250Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["golang","productivity","slack","slackbot"],"created_at":"2025-10-06T15:49:04.833Z","updated_at":"2026-04-21T09:32:39.544Z","avatar_url":"https://github.com/premshree.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lib-slackbot\n\n[![Build Status](https://travis-ci.org/premshree/lib-slackbot.svg?branch=master)](https://travis-ci.org/premshree/lib-slackbot)\n\nlib-slackbot is a thin convenience wrapper around nlopes' excellent [Slack API in Go](https://github.com/nlopes/slack).\n\nWhen writing [slack](https://slack.com/) bots in [Go](https://golang.org/) I found myself repeating a lot of the same boilerplate. This is where lib-slackbot is useful. Currently, lib-slackbot is useful whenever you want to write a bot that listens to commands with optional arguments like so:\n```\n?weather 11231\n?oncall\n```\n\nSee the `examples` directory for an implementation.\n\n## Installation\n\n```\n$ go get github.com/premshree/lib-slackbot\n```\n\n## Example\n\n```go\npackage main\n\nimport(\n  \"time\"\n\n  \"github.com/premshree/lib-slackbot\"\n)\n\nfunc main() {\n  token := \"YOUR_SLACK_BOT_TOKEN\"\n  bot := slackbot.New(token)\n\n  bot.AddCommand(\"?time\", \"What's the local time?\", func(bot *slackbot.Bot, channelID string, channelName string, args ...string) {\n    t := time.Now()\n    bot.Reply(channelID, t.Format(\"Mon Jan _2 15:04:05 2006\"))\n  })\n\n  // Run starts the bot's listen loop\n  bot.Run()\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpremshree%2Flib-slackbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpremshree%2Flib-slackbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpremshree%2Flib-slackbot/lists"}