mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-04-30 02:59:54 +03:00
Add StringBuilder & Markdown extensions (#206)
In this PR, I have added StringBuilder extensions to avoid `.Append` reuse such as `.Append("- ").AppendLine()` Closes #205 --------- Signed-off-by: mctaylors <cantsendmails@mctaylors.ru>
This commit is contained in:
parent
5fce01c15c
commit
18cdc63883
9 changed files with 119 additions and 44 deletions
|
@ -138,9 +138,9 @@ public class SettingsCommandGroup : CommandGroup
|
|||
var optionName = AllOptions[i].Name;
|
||||
var optionValue = AllOptions[i].Display(cfg);
|
||||
|
||||
description.AppendLine($"- {$"Settings{optionName}".Localized()}")
|
||||
.Append($" - {Markdown.InlineCode(optionName)}: ")
|
||||
.AppendLine(optionValue);
|
||||
description.AppendBulletPointLine($"Settings{optionName}".Localized())
|
||||
.AppendSubBulletPoint(Markdown.InlineCode(optionName))
|
||||
.Append(": ").AppendLine(optionValue);
|
||||
}
|
||||
|
||||
var embed = new EmbedBuilder().WithSmallTitle(Messages.SettingsListTitle, bot)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue