{"id":29829037,"url":"https://github.com/dpca/slack-emoji-bot","last_synced_at":"2025-07-29T08:15:10.302Z","repository":{"id":150055734,"uuid":"69706367","full_name":"dpca/slack-emoji-bot","owner":"dpca","description":"Detects new slack emoji and posts about them in a channel","archived":false,"fork":false,"pushed_at":"2025-04-07T19:17:56.000Z","size":124,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-07T20:27:12.713Z","etag":null,"topics":["slack"],"latest_commit_sha":null,"homepage":null,"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/dpca.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2016-09-30T22:28:43.000Z","updated_at":"2025-04-07T19:18:01.000Z","dependencies_parsed_at":"2023-05-12T16:00:49.857Z","dependency_job_id":null,"html_url":"https://github.com/dpca/slack-emoji-bot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dpca/slack-emoji-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpca%2Fslack-emoji-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpca%2Fslack-emoji-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpca%2Fslack-emoji-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpca%2Fslack-emoji-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dpca","download_url":"https://codeload.github.com/dpca/slack-emoji-bot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dpca%2Fslack-emoji-bot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267652828,"owners_count":24122100,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["slack"],"created_at":"2025-07-29T08:15:07.391Z","updated_at":"2025-07-29T08:15:10.295Z","avatar_url":"https://github.com/dpca.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# slack-emoji-bot\n\n![Emoji bot](/images/emojibot.png)\n\nSimple bot that detects new Slack emoji added through\nhttps://my.slack.com/customize/emoji and notifies a channel about them.\nIntended to run on a schedule, such as every hour, using cron.\n\n[Emoji-bot](emoji-bot.rb) uses the\n[slack-ruby-client](https://github.com/slack-ruby/slack-ruby-client) gem to\neasily interact with the Slack API. On initial run, the\n[emoji.list](https://api.slack.com/methods/emoji.list) method is called and the\nlist of all emoji is saved in an `emoji.txt` file. Every subsequent time the\nscript is run, it asks Slack for the emoji list again and compares the existing\nemoji and the new list. If any new emoji are found, the\n[chat.postMessage](https://api.slack.com/methods/chat.postMessage) method is\ncalled with a random response from `responses.txt` and the new emoji. Finally,\nthe new list of emoji are saved in `emoji.txt`.\n\n## Running with Docker\n\nThe simplest way to run is with [docker](https://www.docker.com/), which will\ncheck every hour for new emoji in a container:\n\n```bash\ndocker run -it -d \\\n  -e SLACK_API_TOKEN=\"$TOKEN\" \\\n  -e SLACK_CHANNEL=\"#emojis\" \\\n  -e SLACK_USERNAME=\"emoji-bot\" \\\n  -e SLACK_ICON_EMOJI=\":parrot:\" \\\n  --name emoji-bot \\\n  ghcr.io/dpca/slack-emoji-bot:master\n```\n\nYou can see if the container is up by using `docker ps`, and check its logs\nwith `docker logs emoji-bot`. Omit the `-d` option to run the docker container\nin the foreground for development purposes.\n\nYou can request a token for testing purposes from\nhttps://api.slack.com/docs/oauth-test-tokens but should use a bot token from\nhttps://my.slack.com/services/new/bot for a real deployment. Read more about\nbot users here: https://api.slack.com/bot-users\n\nIf not provided, SLACK_USERNAME defaults to \"emoji-bot\" and SLACK_ICON_EMOJI\ndefaults to [\":parrot:\"](http://cultofthepartyparrot.com/).\n\n## Running locally\n\n### Setup\n\nFirst, you need to set your `SLACK_API_TOKEN` and `SLACK_CHANNEL` to message in\n`.env`. Then, save initial emoji:\n\n```\nbundle install\n./emoji-bot.rb --setup\n```\n\n### Run\n\n```\n./emoji-bot.rb\n```\n\n### Cron\n\nYou can run the emoji-bot automatically by adding something like the following\nto your crontab (`crontab -e`):\n\n```\n0 * * * * cd /home/USER/slack-emoji-bot \u0026\u0026 /usr/local/bin/ruby emoji-bot.rb \u003e\u003e /home/USER/slack-emoji-bot/cronOutput.txt 2\u003e\u00261\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdpca%2Fslack-emoji-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdpca%2Fslack-emoji-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdpca%2Fslack-emoji-bot/lists"}