mirror of
https://codeberg.org/pupdad/DeckBot.git
synced 2026-06-01 01:09:50 +00:00
No description
| src | ||
| .gitignore | ||
| bun.lock | ||
| LICENSE.txt | ||
| package.json | ||
| README.md | ||
| tsconfig.json | ||
DeckBot
Custom locally-run CAH bot for Discord that I made in a weekend.
Thanks to crhallberg for the CAHDeck JSON library and Reread Games for the ManyDecks format.
Requires:
- Bun
- Discord Developer Access
- Friends
Commands:
/cah [max-points]- Start new game with given point limit in new thread of channel/play- Join game in thread/select [number(s)]- Select card(s) to play, or winner as Czar/add [code]- See below
How to run:
- Clone repo
- Install bun and run
bun install - Make .env and fill the following values from Discord.dev Dashboard:
DISCORD_TOKEN=<TOKEN>
DISCORD_CLIENT_ID=<CLIENT_ID>
DISCORD_GUILD_ID=<GUILD>
- Run
bun run src/index.ts - Add to server
- Play the game
How to add decks:
Easy method (ManyDecks):
- Get a deck code from Many Decks.
- Type
/add <CODE>into Discord.
Harder method (ManyDecks & JSON Against Humanity):
- Download deck file
- JSON Against Humanity:
- Go to the website, select your decks and download in 'full' format.
- ManyDecks:
- If you made the deck, login to ManyDecks go into the edit page for the deck and click "Download"
- If you didn't make the deck, you can go to
https://decks.rereadgames.com/api/decks/CODE(replace CODE with deck code) and download the .json5 file that appears in the browser
- JSON Against Humanity:
- Drop in either
src/decks/jsonorsrc/decks/manydecksbased on source. - Reload bot
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License, as per the original Cards Against Humanity® license.
