mirror of
https://github.com/RPCS3/discord-bot.git
synced 2024-11-27 04:00:34 +00:00
better formatting
This commit is contained in:
parent
a42485d1b8
commit
8416622812
@ -114,7 +114,14 @@ namespace CompatBot.Utils
|
||||
return null;
|
||||
|
||||
var embedBuilder = MakeReportTemplate(client, infraction, message, severity, actionList);
|
||||
var reportText = string.IsNullOrEmpty(trigger) ? "" : $"Triggered by: `{trigger}`{Environment.NewLine}";
|
||||
var matchedOn = "";
|
||||
var matchedOnIdx = trigger.IndexOf(" (matched on");
|
||||
if (matchedOnIdx > 0)
|
||||
{
|
||||
matchedOn = trigger[matchedOnIdx ..];
|
||||
trigger = trigger[..matchedOnIdx];
|
||||
}
|
||||
var reportText = string.IsNullOrEmpty(trigger) ? "" : $"Triggered by: `{trigger}`{matchedOn}{Environment.NewLine}";
|
||||
if (!string.IsNullOrEmpty(context))
|
||||
reportText += $"Triggered in: ```{context.Sanitize()}```{Environment.NewLine}";
|
||||
embedBuilder.Description = reportText + embedBuilder.Description;
|
||||
|
Loading…
Reference in New Issue
Block a user