https://github.com/3kh0/stacked
Stacked is a economy game about collecting items, gambling, and using them to fight other players, all within Slack
https://github.com/3kh0/stacked
slack slack-bot
Last synced: 12 months ago
JSON representation
Stacked is a economy game about collecting items, gambling, and using them to fight other players, all within Slack
- Host: GitHub
- URL: https://github.com/3kh0/stacked
- Owner: 3kh0
- Created: 2025-05-19T20:51:01.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-27T14:12:26.000Z (12 months ago)
- Last Synced: 2025-06-29T10:59:35.304Z (12 months ago)
- Topics: slack, slack-bot
- Language: JavaScript
- Homepage:
- Size: 281 KB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Stacked [](https://github.com/3kh0/stacked/actions/workflows/lint.yml)
Stacked is an economy game about collecting items, gambling, and using them to fight other players, all within Slack (Slack, where the work happens), powered by Supabase.
## Getting Started
- Node (duh)
- [pnpm](https://pnpm.io/)
- A [Slack App](https://api.slack.com/apps) with a token and signing secret
- A [Supabase](https://supabase.com/) project
1. Clone the repository
2. Install dependencies:
```sh
pnpm install
```
3. Create a .env file in the project root:
```env
SLACK_BOT_TOKEN=xoxb-abcdefghijklmnopqrstuvwxyz123456
SLACK_SIGNING_SECRET=abcdefghijklmnopqrstuvwxyz123456
SUPABASE_URL=https://abcdefghijklmnopqrstuvwxyz123456.supabase.co
SUPABASE_SERVICE_ROLE_KEY=abcdefghijklmnopqrstuvwxyz123456
SUPABASE_USERS_TABLE=users
```
4. Setup the database, here is a oneliner that will get you up and running. You can paste it into your Supabase SQL editor.
```sql
CREATE TABLE public.users (
slack_uid text NOT NULL,
inventory jsonb NULL DEFAULT '[]'::jsonb,
balance numeric NOT NULL DEFAULT '0'::numeric,
hp numeric NOT NULL DEFAULT '100'::numeric,
opt_status boolean NOT NULL DEFAULT false,
attack_cooldown numeric NULL,
daily_cooldown numeric NULL,
weekly_cooldown numeric NULL,
hourly_cooldown numeric NULL,
CONSTRAINT users_pkey PRIMARY KEY (slack_uid),
CONSTRAINT users_slack_uid_key UNIQUE (slack_uid)
);
```
5. Nab all the emojis, they will be added to the repo in due time™ If you are already in the Hack Club Slack, the emojis are already there and no further action is needed from you.
6. Make sure you add a slash command to your Slack bot. Here is the recommended configuration. Make sure you have escape names and channels selected.

7. Start the bot:
```sh
pnpm start
```
Or if you would like it to auto-reload on changes:
```sh
pnpm dev
```
## Contributions
Yes please! Keep in mind where functions go and what not. Aka just don't mess things up too much.