{"id":25213119,"url":"https://github.com/jaredhalpern/rolld","last_synced_at":"2025-09-05T08:11:19.493Z","repository":{"id":50205537,"uuid":"132691929","full_name":"JaredHalpern/Rolld","owner":"JaredHalpern","description":"Slack integration to roll RPG dice in-channel","archived":false,"fork":false,"pushed_at":"2022-12-08T02:14:54.000Z","size":42,"stargazers_count":3,"open_issues_count":6,"forks_count":3,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-04-01T12:03:55.293Z","etag":null,"topics":["dice-roller","dungeons-and-dragons","flask","game","games","heroku","python","roll-dice","rpg","rpg-tool","slack"],"latest_commit_sha":null,"homepage":"https://jaredhalpern.com/Rolld/","language":"Python","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/JaredHalpern.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-05-09T02:40:19.000Z","updated_at":"2021-07-29T03:06:12.000Z","dependencies_parsed_at":"2023-01-25T03:15:36.324Z","dependency_job_id":null,"html_url":"https://github.com/JaredHalpern/Rolld","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JaredHalpern/Rolld","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JaredHalpern%2FRolld","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JaredHalpern%2FRolld/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JaredHalpern%2FRolld/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JaredHalpern%2FRolld/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JaredHalpern","download_url":"https://codeload.github.com/JaredHalpern/Rolld/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JaredHalpern%2FRolld/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273728188,"owners_count":25157146,"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-09-05T02:00:09.113Z","response_time":402,"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":["dice-roller","dungeons-and-dragons","flask","game","games","heroku","python","roll-dice","rpg","rpg-tool","slack"],"created_at":"2025-02-10T15:18:56.420Z","updated_at":"2025-09-05T08:11:14.473Z","avatar_url":"https://github.com/JaredHalpern.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rolld\nRPG-dice Slack integration ([source](https://github.com/JaredHalpern/Rolld))\n\nRolld is a Slack Integration that makes it easy to roll dice in a Slack Channel. That's really all there is to it. I put this thing together in a few hours downtime when I needed to take a break from writing the [book](https://amzn.to/2J2ItUa). I don't plan to distribute it via Slack because I don't want the dozens (there are dozens of us!) of Slack gamers banging on my free-tier Heroku dyno. But you can deploy your own Rolld app to a Heroku dyno and integrate it into a Slack channel of your choosing.\n\n\n![Rolld](https://i.imgur.com/LPPo1BS.gif)\n\n\n### Usage\n\nRoll + modifiers. Roll results are broken down inside the `[]` brackets and modifier is appended with a `+`.\n\n![Rolld](https://i.imgur.com/aL5LdwM.png)\n\nRolld also supports multiple rolls, eg: `/roll 2d6`\n\n![Rolld](https://i.imgur.com/wWfiY08.png)\n\n### Steps to Setup your own Rolld App\n\nSteps to set up this integration for your local Slack channel, using a free dyno on Heroku to host:\n\n1. Clone the repo `git clone git@github.com:JaredHalpern/Rolld.git`\n2. Make sure you have [Homebrew](https://brew.sh/) installed. If not, `/usr/bin/ruby -e \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)\"`\n\n#### Heroku\n\n3. Install the Heroku CLI: `brew install heroku/brew/heroku`\n4. Verify Heroku CLI installation: \n  `heroku --version` should show you something like: \n  `heroku/7.0.35 (darwin-x64) node-v10.0.0`\n5. Ensure you've created an account at [https://www.heroku.com](https://www.heroku.com). You can use the free-tier for now.\n6. Login to Heroku via command line: `heroku login`\n7. Change to the cloned Rolld directory: `cd Rolld`\n8. Set the Heroku buildpack: `heroku buildpacks:set heroku/python`\n9. Create a heroku app: `heroku create`. We'll configure Slack to point to this URL soon. This command also creates a remote pointing to Heroku.\n10. Verify the remote is set up, `git remote -v`.\nYou should see something like: \n  `heroku  https://git.heroku.com/yass-rangers-61413.git (fetch)`\n  `heroku  https://git.heroku.com/yass-rangers-61413.git (push)`\n11. Go to Heroku Settings: `https://dashboard.heroku.com/apps/\u003cyour app name\u003e/settings` and find the Domain. \n  It should say something like: `Your app can be found at https://yass-rangers-61413.herokuapp.com/`. Note down this url for the next step.\n\n#### Create a Slack App\n\n12. Log into to your Slack account via the web: [https://api.slack.com/apps](https://api.slack.com/apps)\n13. Hit the Create New App button\n14. Name the app and choose a workspace in which to deploy it.\n15. In the `Add features and functionality` Section, Click `Slash Commands`.\n16. Hit the `Create New Command` button.\n17. Enter the Command you'd like to use to invoke the integration. `/roll` seems natural.\n18. In Request URL, use the url from Step 11: `https://yass-rangers-61413.herokuapp.com/`\n19. Hit the Save button in the lower right.\n20. In the Install your app to your workspace section, hit the `Install App to Workspace` button to install the integration. We're not done yet though.\n\n#### Verification / Permissioning\n\n21. Scroll down a bit further on the Basic Information page and copy the `Verification Token`. Put it somewhere safe and temporary.\n22. Next click on OAuth \u0026 Permissions on the left-hand side. Copy the OAuth token and put it somewhere safe and temporary.\n23. This next part is a bit odd - we need to get the Team-ID. The best way to do that (that I've found) is to navigate to your team's Slack channel in a web browser, then right-click and inspect the source. Find the text, `team_id` and grab the value next to it. It'll be something like `Z4KRT3F6A`.\n24. We need to set the environmental variables. Best practices say that it's a terrible idea to ever store things like tokens in source-control. We can do this via the Heroku command line, but I'll show you how to do it in the Heroku CLI. Go to `https://dashboard.heroku.com/apps/\u003cyour app name\u003e/settings` and tap the `Reveal Config Vars` button. Enter the following Key-Value pairs: `SLACK_VERIFICATION_TOKEN | value from step 1 in this section`, `SLACK_ROLLD_TOKEN | value from Step 2 in this section`, `SLACK_TEAM_ID     | value from step 3 in this section`\n25. Alternatively, the Heroku [CLI](https://devcenter.heroku.com/articles/config-vars) syntax for setting config variables: `heroku config:set SLACK_VERIFICATION_TOKEN=....your token....`\n\n#### Deploy\n\n26. Push to the Heroku remote: `git push heroku master`\n27. Open Slack, and run your command! `/roll 1d20`\n\nI've probably missed a step or two. If you see something, feel free to file a PR and I'll update. Thanks!\n\n#### Development and Testing\n\n(Below is abbreviated and needs to be expanded upon and explained)\n\n* Use [ngrok](https://ngrok.com/) for testing locally via \"tunneling\".\n* Instructions to set up ngrok specifically to test a Slack bot are [here](https://api.slack.com/tutorials/tunneling-with-ngrok).\n* Command: `ngrok http 5000`\n* Ensure local ENV variables are set - either in `.bashrc` or temporarily. Don't forget to reload the terminal window if needed or source the `.bashrc`.\n* Create a `virtualenv` for Rolld and run: `/Rolld/bin/activate`\n* With the activated `virtualenv`, run: `python app.py`\n* Copy the url present in the Forwarding field provided by `ngrok` to the field `Request URL`. This field is in: Your Apps -\u003e (Features) Slash Commands -\u003e (Click pencil to edit) Request URL. This will forward all calls from Slack to this URL, which happens be running locally on your machine. \n* When done testing, don't forget to set the Request URL back to your Heroku App's URL.\n\n#### Useful links\n[Testing Slack integrations locally](https://api.slack.com/tutorials/tunneling-with-ngrok), [Easily resize gifs online](https://ezgif.com/)\n\n#### Credits\nThanks to Justin Isaf, [jisaf](https://github.com/jisaf) for adding modifiers.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredhalpern%2Frolld","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaredhalpern%2Frolld","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaredhalpern%2Frolld/lists"}