Merge pull request 'chore: add .env.example with placeholder values' (#135) from chore/add-env-example into main
This commit is contained in:
commit
ff768c95f5
54
.env.example
Normal file
54
.env.example
Normal file
@ -0,0 +1,54 @@
|
||||
# Paper Dynasty Discord Bot - Environment Configuration
|
||||
# Copy this file to .env and fill in your actual values.
|
||||
# DO NOT commit .env to version control!
|
||||
|
||||
# =============================================================================
|
||||
# BOT CONFIGURATION
|
||||
# =============================================================================
|
||||
|
||||
# Discord bot token (from Discord Developer Portal)
|
||||
BOT_TOKEN=your-discord-bot-token-here
|
||||
|
||||
# Discord server (guild) ID
|
||||
GUILD_ID=your-guild-id-here
|
||||
|
||||
# Channel ID for scoreboard messages
|
||||
SCOREBOARD_CHANNEL=your-scoreboard-channel-id-here
|
||||
|
||||
# =============================================================================
|
||||
# API CONFIGURATION
|
||||
# =============================================================================
|
||||
|
||||
# Paper Dynasty API authentication token
|
||||
API_TOKEN=your-api-token-here
|
||||
|
||||
# Target database environment: 'dev' or 'prod'
|
||||
# Default: dev
|
||||
DATABASE=dev
|
||||
|
||||
# =============================================================================
|
||||
# APPLICATION CONFIGURATION
|
||||
# =============================================================================
|
||||
|
||||
# Logging level: DEBUG, INFO, WARNING, ERROR
|
||||
# Default: INFO
|
||||
LOG_LEVEL=INFO
|
||||
|
||||
# Python hash seed (set for reproducibility in tests)
|
||||
PYTHONHASHSEED=0
|
||||
|
||||
# =============================================================================
|
||||
# DATABASE CONFIGURATION (PostgreSQL — used by gameplay_models.py)
|
||||
# =============================================================================
|
||||
|
||||
DB_USERNAME=your_db_username
|
||||
DB_PASSWORD=your_db_password
|
||||
DB_URL=localhost
|
||||
DB_NAME=postgres
|
||||
|
||||
# =============================================================================
|
||||
# WEBHOOKS
|
||||
# =============================================================================
|
||||
|
||||
# Discord webhook URL for restart notifications
|
||||
RESTART_WEBHOOK_URL=https://discord.com/api/webhooks/your-webhook-id/your-webhook-token
|
||||
@ -1,3 +1,4 @@
|
||||
# ruff: noqa: F403, F405
|
||||
import copy
|
||||
|
||||
import helpers
|
||||
@ -695,6 +696,9 @@ class Economy(commands.Cog):
|
||||
)
|
||||
return
|
||||
|
||||
# Pack types that are auto-opened and should not appear in the manual open menu
|
||||
AUTO_OPEN_TYPES = {"Check-In Player"}
|
||||
|
||||
# Group packs by type and customization (e.g. Standard, Standard-Orioles, Standard-2012, Premium)
|
||||
p_count = 0
|
||||
p_data = {
|
||||
@ -711,6 +715,11 @@ class Economy(commands.Cog):
|
||||
p_group = None
|
||||
logger.debug(f"pack: {pack}")
|
||||
logger.debug(f"pack cardset: {pack['pack_cardset']}")
|
||||
if pack["pack_type"]["name"] in AUTO_OPEN_TYPES:
|
||||
logger.debug(
|
||||
f"Skipping auto-open pack type: {pack['pack_type']['name']}"
|
||||
)
|
||||
continue
|
||||
if pack["pack_team"] is None and pack["pack_cardset"] is None:
|
||||
p_group = pack["pack_type"]["name"]
|
||||
# Add to p_data if this is a new pack type
|
||||
@ -773,6 +782,9 @@ class Economy(commands.Cog):
|
||||
pretty_name = f"{key.split('-')[0]} - {key.split('-')[3]}"
|
||||
elif "Cardset" in key:
|
||||
pretty_name = f"{key.split('-')[0]} - {key.split('-')[3]}"
|
||||
else:
|
||||
# Pack type name contains a hyphen (e.g. "Check-In Player")
|
||||
pretty_name = key
|
||||
|
||||
if pretty_name is not None:
|
||||
embed.add_field(name=pretty_name, value=f"Qty: {len(p_data[key])}")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user