Skip to content

A Discord bot for playing Pazaak: a Star Wars card game

License

Notifications You must be signed in to change notification settings

Sim0nV/pure-pazaak

Repository files navigation

Pure Pazaak

A recreation of the card game Pazaak from Star Wars: Knights of the Old Republic
Built with discord.py


Python: 3.9.5 Code Style: Black Codefactor Grade License: AGPL-3.0

FeaturesDependenciesConfigurationSelf-HostingUsage

🃏 Features

Check out our launch trailer to see these features in action!

  • Pazaak matches between users, sent through DMs to hide player cards
  • Match spectating via server channel embed
  • Randomized embed thumbnails
  • Toggleable match sound effects
  • Saves user and match stats to MongoDB
  • The following commands:
Command Action
/pazaak [<@user>] Challenges the mentioned user to a Pazaak match or shows usage embed
/rules DMs the Pazaak ruleset
/sfx Toggles Pazaak sound effects
/stats [<@user>] Displays the stats of yourself or the mentioned user,
including your match record with mentioned user
/help Shows a complete list of commands for Pure Pazaak
/acknowledgements Outputs credits and special thanks

📄 Dependencies

Dependencies may be installed by running:

$ pip install -r requirements.txt

⚙️ Configuration

Pure Pazaak is configurable with the following environment variables:

  • IS_DEBUG_MODE: If set to True the bot uses the DEV_BOT_TOKEN environment variable to run, refers to the DEV_DB_COLLECTION for the database, sets log level to INFO, and allows players to challenge themselves. Otherwise, if set to False, the bot uses the respective PROD_... environment variables.
    Default: False

  • SHOULD_SYNC_COMMANDS: If set to True the bot will sync app commands. If False, it will skip syncing.
    Default: False

🖥️ Self-Hosting

Create a Discord app through the developer portal, then create a .env file in the root using .env.example as reference.

The public Pure Pazaak bot uses images, gifs, sounds, and a database, but the bot will still run without needing to include those in the .env file! See .env.barebones.example for an example .env file which will run with just the bot token.

▶️ Usage

Once the dependencies are installed and the .env is properly configured, run the bot using:

$ python main.py

About

A Discord bot for playing Pazaak: a Star Wars card game

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published