Skip to content

Commit c597298

Browse files
LogChannelHelper: Do not log embed/fwd data to #investigations
If this data is present, a note to check the "mod" log channel is included instead
1 parent 769db87 commit c597298

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Helpers/InvestigationsHelpers.cs

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ public static async Task SendInfringingMessaageAsync(string logChannelKey, MockD
1010
{
1111
if (colour is null)
1212
colour = new DiscordColor(0xf03916);
13+
14+
// If logging to #investigations and there is embed/forward data, leave it out & add a note to check #mod-logs instead
15+
if (logChannelKey == "investigations" && !string.IsNullOrEmpty(messageContentOverride) && messageContentOverride != infringingMessage.Content)
16+
messageContentOverride = $"{infringingMessage.Content}\n[...embed content omitted, check <#{Program.cfgjson.LogChannels["mod"].ChannelId}>...]";
1317

1418
var embed = new DiscordEmbedBuilder()
1519
.WithDescription(string.IsNullOrWhiteSpace(messageContentOverride) ? infringingMessage.Content : messageContentOverride)

0 commit comments

Comments
 (0)