Skip to content

Commit e61d226

Browse files
HandyS11claude
andcommitted
fix: cap /status server fields under Discord's 25-field embed limit
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent e3e7a70 commit e61d226

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/RustPlusBot.Features.Commands/Modules/DiagnosticsModule.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ public async Task StatusAsync()
5858
.AddField("Servers (this guild)",
5959
known.Count.ToString(CultureInfo.InvariantCulture), inline: true);
6060

61-
foreach (var server in known)
61+
// Cap server fields so the embed stays under Discord's 25-field limit (4 header fields above).
62+
foreach (var server in known.Take(20))
6263
{
6364
var state = await connections.GetStateAsync(Context.Guild.Id, server.Id).ConfigureAwait(false);
6465
var line = state is null

0 commit comments

Comments
 (0)