]> git.localhorst.tv Git - alttp.git/commitdiff
more compact discord event description
authorDaniel Karbach <daniel.karbach@localhorst.tv>
Sun, 30 Aug 2026 14:04:13 +0000 (16:04 +0200)
committerDaniel Karbach <daniel.karbach@localhorst.tv>
Sun, 30 Aug 2026 14:04:13 +0000 (16:04 +0200)
app/Models/Episode.php

index 1ace6bd1a71425fa6b1f6b76c8c38b0b8fc800cf..fb96b1db4e80e652313bf9941937ffbf1816fba3 100644 (file)
@@ -105,15 +105,22 @@ class Episode extends Model
                        $description .= $this->comment."\n";
                }
                if (count($this->players)) {
-                       $description .= "\nPlayers:\n";
+                       $description .= "Players: ";
+                       $first = true;
                        foreach ($this->players as $player) {
+                               if ($first) {
+                                       $first = false;
+                               } else {
+                                       $description .= ', ';
+                               }
                                $link = $player->getStreamLink();
                                if ($link) {
-                                       $description .= '- ['.$player->getName().']('.$link.")\n";
+                                       $description .= '['.$player->getName().']('.$link.')';
                                } else {
-                                       $description .= '- '.$player->getName()."\n";
+                                       $description .= $player->getName();
                                }
                        }
+                       $description .= "\n";
                }
                $comms = [];
                foreach ($this->confirmedCrew as $crew) {
@@ -122,18 +129,25 @@ class Episode extends Model
                        }
                }
                if (count($comms)) {
-                       $description .= "\nComms:\n";
+                       $description .= "Comms: ";
+                       $first = true;
                        foreach ($comms as $crew) {
+                               if ($first) {
+                                       $first = false;
+                               } else {
+                                       $description .= ', ';
+                               }
                                $link = $crew->getStreamLink();
                                if ($link) {
-                                       $description .= '- ['.$crew->getName().']('.$link.")\n";
+                                       $description .= '['.$crew->getName().']('.$link.')';
                                } else {
-                                       $description .= '- '.$crew->getName()."\n";
+                                       $description .= $crew->getName();
                                }
                        }
+                       $description .= "\n";
                }
                if ($this->raceroom) {
-                       $description .= "\nRaceroom: [".Str::afterLast($this->raceroom, '/').']('.$this->raceroom.")\n";
+                       $description .= "Raceroom: [".Str::afterLast($this->raceroom, '/').']('.$this->raceroom.")\n";
                }
                return $description;
        }