Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ stacked Public

Stacked is a economy game about collecting items, gambling, and using them to fight other players, all within Slack

Notifications You must be signed in to change notification settings

3kh0/stacked

Repository files navigation

Stacked Lint

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

  1. Clone the repository

  2. Install dependencies:

    pnpm install
  3. Create a .env file in the project root:

    SLACK_BOT_TOKEN=xoxb-abcdefghijklmnopqrstuvwxyz123456
    SLACK_APP_TOKEN=xapp-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.

    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.

    image

  7. Start the bot:

    pnpm start

    Or if you would like it to auto-reload on changes:

    pnpm dev

Contributions

Yes please! Keep in mind where functions go and what not. Aka just don't mess things up too much.

About

Stacked is a economy game about collecting items, gambling, and using them to fight other players, all within Slack

Topics

Resources

Stars

Watchers

Forks