feat: show character amount for string fields
This commit is contained in:
@@ -118,7 +118,7 @@ public class Groups
|
||||
|
||||
await ctx.Repository.UpdateGroup(target.Id, new GroupPatch { Name = newName });
|
||||
|
||||
await ctx.Reply($"{Emojis.Success} Group name changed from **{target.Name}** to **{newName}**.");
|
||||
await ctx.Reply($"{Emojis.Success} Group name changed from **{target.Name}** to **{newName}** (using {newName.Length}/{Limits.MaxGroupNameLength} characters).");
|
||||
}
|
||||
|
||||
public async Task GroupDisplayName(Context ctx, PKGroup target)
|
||||
@@ -159,6 +159,8 @@ public class Groups
|
||||
+ $"To clear it, type `pk;group {reference} displayname -clear`."
|
||||
+ $"To print the raw display name, type `pk;group {reference} displayname -raw`.");
|
||||
|
||||
eb.Footer(new Embed.EmbedFooter($"Using {target.DisplayName.Length}/{Limits.MaxGroupNameLength} characters."));
|
||||
|
||||
await ctx.Reply(embed: eb.Build());
|
||||
}
|
||||
|
||||
@@ -183,7 +185,7 @@ public class Groups
|
||||
var patch = new GroupPatch { DisplayName = Partial<string>.Present(newDisplayName) };
|
||||
await ctx.Repository.UpdateGroup(target.Id, patch);
|
||||
|
||||
await ctx.Reply($"{Emojis.Success} Group display name changed.");
|
||||
await ctx.Reply($"{Emojis.Success} Group display name changed (using {newDisplayName.Length}/{Limits.MaxGroupNameLength} characters).");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -217,7 +219,8 @@ public class Groups
|
||||
$"To print the description with formatting, type `pk;group {target.Reference(ctx)} description -raw`."
|
||||
+ (ctx.System?.Id == target.System
|
||||
? $" To clear it, type `pk;group {target.Reference(ctx)} description -clear`."
|
||||
: "")))
|
||||
: "")
|
||||
+ $" Using {target.Description.Length}/{Limits.MaxDescriptionLength} characters."))
|
||||
.Build());
|
||||
return;
|
||||
}
|
||||
@@ -239,7 +242,7 @@ public class Groups
|
||||
var patch = new GroupPatch { Description = Partial<string>.Present(description) };
|
||||
await ctx.Repository.UpdateGroup(target.Id, patch);
|
||||
|
||||
await ctx.Reply($"{Emojis.Success} Group description changed.");
|
||||
await ctx.Reply($"{Emojis.Success} Group description changed (using {description.Length}/{Limits.MaxDescriptionLength} characters).");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user