Skip to content

Commit

Permalink
LogChannelHelper: Do not log embed/fwd data to #investigations
Browse files Browse the repository at this point in the history
If this data is present, a note to check the "mod" log channel is included instead
  • Loading branch information
FloatingMilkshake committed Feb 15, 2025
1 parent 769db87 commit c597298
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Helpers/InvestigationsHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ public static async Task SendInfringingMessaageAsync(string logChannelKey, MockD
{
if (colour is null)
colour = new DiscordColor(0xf03916);

// If logging to #investigations and there is embed/forward data, leave it out & add a note to check #mod-logs instead
if (logChannelKey == "investigations" && !string.IsNullOrEmpty(messageContentOverride) && messageContentOverride != infringingMessage.Content)
messageContentOverride = $"{infringingMessage.Content}\n[...embed content omitted, check <#{Program.cfgjson.LogChannels["mod"].ChannelId}>...]";

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

0 comments on commit c597298

Please sign in to comment.