diff --git a/premades.php b/premades.php index 8fc8795..8f205f0 100644 --- a/premades.php +++ b/premades.php @@ -37,8 +37,14 @@ if (!empty($allDiscordIds)) { } } -function premade_name_for(int $discordId, array $namesByDiscordId): string +// Bevorzugt den von der Bot-API aufgeloesten Discord-Anzeigenamen (die API kennt Discord direkt, +// die Website nicht); faellt auf den verknuepften Website-Account und zuletzt auf die rohe +// Discord-ID zurueck, falls beides fehlt (z.B. Bot offline beim API-Aufruf). +function premade_name_for(int $discordId, array $namesByDiscordId, ?string $apiName = null): string { + if ($apiName !== null && $apiName !== '') { + return $apiName; + } return $namesByDiscordId[$discordId] ?? ('Discord-Nutzer ' . $discordId); } @@ -85,7 +91,7 @@ include __DIR__ . '/includes/header.php';
Einladung zu - von + von
@@ -141,7 +147,7 @@ include __DIR__ . '/includes/header.php';

⚔️

- 👑 + 👑 Mitglieder
@@ -149,7 +155,7 @@ include __DIR__ . '/includes/header.php';
  • - + @@ -163,7 +169,7 @@ include __DIR__ . '/includes/header.php';
  • - ⏳ (Einladung offen) + ⏳ (Einladung offen) @@ -214,7 +220,7 @@ include __DIR__ . '/includes/header.php';