The team-role feature was aimed at the wrong bot. Tournament participants live in the economy/community guild, but team-role sync had been bolted onto the dev bot's roster sync (sync_member), which bails out for anyone missing from the internal member sheet - so it could never reach its actual audience. Decouple it: keep the (roster-independent) team-sheet parsing, pull the team wiring off the dev/member-sync path, and re-home it on the economy bot. - core/member_sync: revert sync_member to add-only (drop team block + SyncResult.roles_removed); add roster-independent sync_team_role and a whole-guild sync_all_team_roles returning a reporting summary. Still only ever touches role NAMES present in the team sheet. - commands/economy_team_commands: new admin-only /teamsync command. - bot.py: hourly team_sync_hourly task (economy-only, no-op unless TEAM_SHEET_ID is set; first tick at boot covers startup load); register /teamsync under the economy profile; drop the dev-side startup load. - commands/dev_member_commands: /check no longer refreshes teams or reports removed roles. - strings + .env.example: TEAMSYNC_UI, CMD[teamsync], document TEAM_SHEET_ID. - tests: retarget sync tests to sync_team_role; add sync_all_team_roles case. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01R6JZkyszyDFuFtk25WBbcR
50 lines
1.7 KiB
Plaintext
50 lines
1.7 KiB
Plaintext
|
|
# Profile-specific Discord bot tokens (from https://discord.com/developers/applications)
|
|
DISCORD_TOKEN_DEV=your-dev-bot-token-here
|
|
DISCORD_TOKEN_ECONOMY=your-economy-bot-token-here
|
|
|
|
# Legacy fallback token (optional, backward compatibility)
|
|
DISCORD_TOKEN=
|
|
|
|
# Google Sheets spreadsheet ID (the long string in the sheet URL)
|
|
SHEET_ID=your-google-sheet-id-here
|
|
|
|
# Separate spreadsheet holding tournament team registrations (Team Name + lineup
|
|
# of Discord usernames). Optional; drives /teamsync + hourly team-role sync on
|
|
# the economy/community bot. Leave unset to disable team-role sync entirely.
|
|
TEAM_SHEET_ID=
|
|
|
|
# Path to Google service account credentials JSON
|
|
GOOGLE_CREDS_PATH=credentials.json
|
|
|
|
# Profile-specific guild (server) IDs - right-click your server with dev mode on
|
|
GUILD_ID_DEV=your-dev-guild-id-here
|
|
GUILD_ID_ECONOMY=your-economy-guild-id-here
|
|
|
|
# Legacy fallback guild ID (optional, backward compatibility)
|
|
GUILD_ID=
|
|
|
|
# Channel ID where birthday announcements are posted (dev profile)
|
|
BIRTHDAY_CHANNEL_ID_DEV=your-dev-birthday-channel-id-here
|
|
|
|
# Optional birthday channel for economy profile (normally unset for economy-only bot)
|
|
BIRTHDAY_CHANNEL_ID_ECONOMY=
|
|
|
|
# Legacy fallback birthday channel ID (optional, backward compatibility)
|
|
BIRTHDAY_CHANNEL_ID=
|
|
|
|
# How many days before a birthday the on-join check counts as "coming up"
|
|
BIRTHDAY_WINDOW_DAYS=7
|
|
|
|
# PocketBase backend (https://pocketbase.io)
|
|
PB_URL=http://127.0.0.1:8090
|
|
PB_ADMIN_EMAIL=admin@example.com
|
|
PB_ADMIN_PASSWORD=your-pb-admin-password
|
|
|
|
# Profile-specific PocketBase collections
|
|
PB_ECONOMY_COLLECTION_DEV=economy_users_dev
|
|
PB_ECONOMY_COLLECTION_ECONOMY=economy_users_prod
|
|
|
|
# Legacy fallback collection name (optional, backward compatibility)
|
|
PB_ECONOMY_COLLECTION=
|