All checks were successful
Deploy Bot on NAS / deploy (push) Successful in 26s
Replaces display-name prefix parsing ([RTF]/[RTFC]/[RTFR]) with Discord role-based clan detection (TEAI/TEAF/TEAC/TEACO). - config: new CLAN_CONFIG with 4 TEA clans, CLAN_ROLE_IDS, CLAN_MIGRATION - helpers: get_user_clan() replaced by get_clan_from_member() - DatabaseManager: adds clan column on startup, auto-migrates existing records from old username prefixes, filters leaderboard by clan column - pb_handler: detects clan from roles on submission, passes it to DB - leaderboard_handler: reads clan from DB column instead of username - top10: new commands !teai*/!teaf*/!teac*/!teaco* (removes !rtf*) - guide: updated command list and bot title Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
51 lines
1.7 KiB
Python
51 lines
1.7 KiB
Python
# -*- coding: utf-8 -*-
|
|
import os
|
|
from dotenv import load_dotenv
|
|
|
|
load_dotenv()
|
|
|
|
# Token et channel autorisé
|
|
DISCORD_TOKEN = os.getenv("DISCORD_TOKEN")
|
|
AUTHORIZED_CHANNEL_ID = int(os.getenv("AUTHORIZED_CHANNEL_ID"))
|
|
|
|
# Chemins
|
|
SCREENSHOTS_BASE_PATH = "/app/screenshots"
|
|
DATABASE_PATH = "/app/data/bot_data.db"
|
|
|
|
# Configuration des clans TEA - The Ember Accord
|
|
CLAN_CONFIG = {
|
|
'TEAI': {'name': 'TEAI', 'full_name': 'Inferno', 'emoji': '🔥', 'color': 0xff4500},
|
|
'TEAF': {'name': 'TEAF', 'full_name': 'Flame', 'emoji': '🛡️', 'color': 0x00ff00},
|
|
'TEAC': {'name': 'TEAC', 'full_name': 'Cinder', 'emoji': '⚔️', 'color': 0x1e90ff},
|
|
'TEACO': {'name': 'TEACO', 'full_name': 'Corrupted Olympians', 'emoji': '👑', 'color': 0x9932cc},
|
|
}
|
|
|
|
# Mapping role Discord ID → clé de clan
|
|
CLAN_ROLE_IDS = {
|
|
1190674529731747901: 'TEAI',
|
|
1197646966599983185: 'TEAF',
|
|
1220014404809261076: 'TEAC',
|
|
1496965820868198550: 'TEACO',
|
|
}
|
|
|
|
# Mapping anciens clans → nouveaux (migration base existante)
|
|
CLAN_MIGRATION = {
|
|
'RTF': 'TEAI',
|
|
'RTFC': 'TEAF',
|
|
'RTFR': 'TEAC',
|
|
}
|
|
|
|
# Configuration des boss avec difficultés
|
|
BOSS_CONFIG = {
|
|
'hydra': {'name': 'Hydra', 'emoji': '📍', 'color': 0xff6b35,
|
|
'difficulties': ['normal', 'hard', 'brutal', 'nightmare']},
|
|
'chimera': {'name': 'Chimera', 'emoji': '🦁', 'color': 0x9932cc,
|
|
'difficulties': ['easy', 'normal', 'hard', 'brutal', 'nightmare', 'ultra']},
|
|
'cvc': {'name': 'Clan vs Clan', 'emoji': '✔️', 'color': 0xff0000, 'difficulties': []}
|
|
}
|
|
|
|
# Mappings pour diminutifs de difficultés
|
|
DIFFICULTY_SHORTCUTS = {
|
|
'nm': 'nightmare',
|
|
'unm': 'ultra'
|
|
}
|