{"id":24344422,"url":"https://github.com/xtream1101/break-room-bot","last_synced_at":"2025-04-09T17:15:27.756Z","repository":{"id":81334967,"uuid":"220535211","full_name":"xtream1101/break-room-bot","owner":"xtream1101","description":"Play connect 4 in slack","archived":false,"fork":false,"pushed_at":"2020-03-31T20:18:39.000Z","size":486,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-09T17:15:23.300Z","etag":null,"topics":["connect4","game","self-hosted","slackbot"],"latest_commit_sha":null,"homepage":"","language":"Python","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/xtream1101.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}},"created_at":"2019-11-08T19:34:37.000Z","updated_at":"2020-09-17T12:52:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"f81ce44c-7269-411d-8381-101a6cbbd2a1","html_url":"https://github.com/xtream1101/break-room-bot","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/xtream1101%2Fbreak-room-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtream1101%2Fbreak-room-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtream1101%2Fbreak-room-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtream1101%2Fbreak-room-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xtream1101","download_url":"https://codeload.github.com/xtream1101/break-room-bot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248074922,"owners_count":21043490,"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":["connect4","game","self-hosted","slackbot"],"created_at":"2025-01-18T09:36:17.057Z","updated_at":"2025-04-09T17:15:27.751Z","avatar_url":"https://github.com/xtream1101.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Break Room Bot\nTake a break and play some games inside of slack  \n\n\n## Games\n- **Connect 4**\n- **Mastermind**\n\nUse the slash command `/breakroom` to find out more!  \n\n## Adding BreakRoom Bot to your **Slack Team**\n\n[![Add to Slack](https://platform.slack-edge.com/img/add_to_slack.png)](https://slack.com/oauth/authorize?client_id=5199961139.860911396486\u0026scope=commands,chat:write:bot)\n\n\n# Creating a custom theme\n\n\u003cdetails\u003e\n  \u003csummary\u003eConnect4\u003c/summary\u003e\n\n### Assets\n\nIn the folder `src/connect4/assets`, create a theme folder, i.e. `src/connect4/assets/classic` Inside that folder you will need to put the following assets for your theme. All assets must be png format to allow for transparency.  \nIf you add a file called `about.txt` into your theme folder, then that text will render next to your theme when a user uses the command `/connect4 themes`. Only the first 200 characters will be displayed.  \n\nThe theme files that created the assets can be stored in the directory `raw_assets/connect4/`.  \n\n#### Board\n_Required_  \nFilename: `board.png`  \nWidth: `430px`  \nHeight: `370px` (actual board size), can be taller if some type of header is wanted, but the board must start in the bottom left.  \nFrom the bottom left, the pieces are 10px to the right and 10px from the bottom. This repeats until you get a 7 wide and 6 heigh board (creating the above dimensions).\n\n#### Pieces\n_Required_  \nFilenames: `player1.png` \u0026 `player2.png`  \nWidth: `50px`  \nHeight: `50px`  \nThese are the player pieces and will be rendered on the board in the correct spots as players play. When rendered, they are layered on top of the `board.png`\n\n#### Latest Move\n_Optional_  \nFilename: `latest_move.png`  \nWidth: any  \nHeight: any  \nThis will denote where the last player was played. It will be rendered above the `player*.png` \u0026 `board.png`. It will render center to the players piece which is why size does not matter.\n\n#### Won spots\n_Optional_  \nFilename: `won.png`  \nWidth: any  \nHeight: any  \nWhen a game has been won by a player, this will overlay the pieces that let them win. In this case, the `latest_move.png` will NOT render. It will render center to the players piece which is why size does not matter.\n\u003c/details\u003e\n\n\n\u003cdetails\u003e\n  \u003csummary\u003eMastermind\u003c/summary\u003e\n\n### Assets\n\nIn the folder `src/mastermind/assets`, create a theme folder, i.e. `src/mastermind/assets/classic` Inside that folder you will need to put the following assets for your theme. All assets must be png format to allow for transparency.  \nIf you add a file called `about.txt` into your theme folder, then that text will render next to your theme when a user uses the command `/mastermind themes`. Only the first 200 characters will be displayed.  \n\nThe theme files that created the assets can be stored in the directory `raw_assets/mastermind/`.  \n\n\n### **hole.png**\nThis is a single peg hole block. Should be square to work best. The default theme uses a 60px by 60px canvas for this asset.\n\n\n### **row_sep.png**\nThis is the separator between each row of guesses. Must be the same width as the `hole.png` asset, but the height is up to you.\n\n### **peg-[0-5].png**\nThese are the pegs that the user plays with. The canvas must be the same size as used in the `hole.png` asset.  \nThis game has 6 color options, so name 6 pegs from `peg-0.png` ... `peg-5.png` \n\n### **colors.csv**\nThis is a file that will let the game know what color each peg is called. These names are used to create the buttons the player uses.  \nAn example of this file would be:\n```csv\n0,White\n1,Black\n2,Green\n3,Red\n4,Yellow\n5,Blue\n```\n\n### **peg-[bw].png**\nThese pegs are used as feedback. The canvas must be the same size as used in the `hole.png` asset.  \nThe peg `peg-b.png` means that a players peg is in the correct color and position, and the peg `peg-w.png` means that a peg is the correct color, but wrong position.\n\n\u003c/details\u003e\n\n\n\n# Running on your own server\n\n\u003cdetails\u003e\n  \u003csummary\u003eHow to self host this bot\u003c/summary\u003e\n\n## Services needs\n - S3 buckets, either through aws or running your own using MinIO or the like.\n - Redis cache\n - API server where this app will run\n\n## ENV vars to set\n- `REDIS_HOST`\n- `REDIS_PASSWORD`\n- `BASE_URL`\n- `RENDERED_IMAGES_BUCKET` - Needs to be public\n- `GAME_HISTORY_BUCKET` - Needs to be private, TODO: change to save to postgres\n- `AWS_ACCESS_KEY_ID`\n- `AWS_SECRET_ACCESS_KEY`\n- `S3_ENDPOINT` - optional, will default to aws s3\n- `OAUTH_BUCKET` - only needed if oauth is being used. Needs to be private\n- `SLACKBOT_CLIENT_SECRET` - only needed if oauth is being used\n- `SLACKBOT_CLIENT_ID` - only needed if oauth is being used\n\n\n### Slack bot settings\n\n#### Permissions\nNeeds:\n- `chat:write:bot`\n- `commands`\n\n#### Slash Command\n- `/breakroom`  \n    Set the Request url to be `https://YOUR_DOMAIN/slack/breakroom`.  \n \n- `/connect4`  \n    Set the Request url to be `https://YOUR_DOMAIN/slack/connect4`.  \n    Enable the checkbox for _Escape channels, users, and links sent to your app_  \n\n- `/mastermind`  \n    Set the Request url to be `https://YOUR_DOMAIN/slack/mastermind`.   \n\n\n#### Interactive Components\nEnable and add the Request Url to be `https://YOUR_DOMAIN/slack/interactive`  \n\n#### For slack oauth\nSet up a redirect url: `https://YOUR_DOMAIN/slack/oauth`\n\n## Running the server\nRun the api server: `gunicorn server:api -w 2 --reload`\n\u003c/details\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxtream1101%2Fbreak-room-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxtream1101%2Fbreak-room-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxtream1101%2Fbreak-room-bot/lists"}