mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-04-30 11:09: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
|
@ -134,7 +134,7 @@ public class KickCommandGroup : CommandGroup
|
|||
{
|
||||
var dmEmbed = new EmbedBuilder().WithGuildTitle(guild)
|
||||
.WithTitle(Messages.YouWereKicked)
|
||||
.WithDescription($"- {string.Format(Messages.DescriptionActionReason, reason)}")
|
||||
.WithDescription(MarkdownExtensions.BulletPoint(string.Format(Messages.DescriptionActionReason, reason)))
|
||||
.WithActionFooter(executor)
|
||||
.WithCurrentTimestamp()
|
||||
.WithColour(ColorsList.Red)
|
||||
|
@ -159,7 +159,7 @@ public class KickCommandGroup : CommandGroup
|
|||
data.GetOrCreateMemberData(target.ID).Roles.Clear();
|
||||
|
||||
var title = string.Format(Messages.UserKicked, target.GetTag());
|
||||
var description = $"- {string.Format(Messages.DescriptionActionReason, reason)}";
|
||||
var description = MarkdownExtensions.BulletPoint(string.Format(Messages.DescriptionActionReason, reason));
|
||||
var logResult = _utility.LogActionAsync(
|
||||
data.Settings, channelId, executor, title, description, target, ColorsList.Red, ct: ct);
|
||||
if (!logResult.IsSuccess)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue