diff --git a/Program.cs b/Program.cs index bd0e0e5c..e743c5d8 100644 --- a/Program.cs +++ b/Program.cs @@ -386,6 +386,21 @@ async Task MessageCreated(DiscordClient client, MessageCreateEventArgs e) if (matches.Count > cfgjson.MassEmojiThreshold) { e.Message.DeleteAsync(); + DiscordChannel logChannel = await discord.GetChannelAsync(Program.cfgjson.LogChannel); + var embed = new DiscordEmbedBuilder() + .WithDescription(e.Message.Content) + .WithColor(new DiscordColor(0xf03916)) + .WithTimestamp(e.Message.Timestamp) + .WithFooter( + $"User ID: {e.Author.Id}", + null + ) + .WithAuthor( + $"{e.Author.Username}#{e.Author.Discriminator} in #{e.Channel.Name}", + null, + e.Author.AvatarUrl + ); + logChannel.SendMessageAsync($"{cfgjson.Emoji.Denied} Deleted infringing message by {e.Author.Mention} in {e.Channel.Mention}:", embed); if (Warnings.GetPermLevel(member) == ServerPermLevel.nothing && !db.HashExists("emojiPardoned", e.Message.Author.Id.ToString())) {