Move message ID from context to footer

This commit is contained in:
Noi 2022-12-02 20:06:51 -08:00
parent 9d04d22a71
commit 36c050afc8
2 changed files with 3 additions and 3 deletions

View file

@ -8,6 +8,7 @@ namespace RegexBot.Modules.ModLogs;
[RegexbotModule] [RegexbotModule]
internal partial class ModLogs : RegexbotModule { internal partial class ModLogs : RegexbotModule {
// TODO consider resurrecting 2.x idea of logging actions to db, making it searchable? // TODO consider resurrecting 2.x idea of logging actions to db, making it searchable?
// TODO more robust channel filtering. define channels in config array, add check to it out here.
public ModLogs(RegexbotClient bot) : base(bot) { public ModLogs(RegexbotClient bot) : base(bot) {
// TODO missing logging features: joins, leaves, user edits (nick/username/discr) // TODO missing logging features: joins, leaves, user edits (nick/username/discr)

View file

@ -31,7 +31,7 @@ internal partial class ModLogs {
var reportEmbed = new EmbedBuilder() var reportEmbed = new EmbedBuilder()
.WithTitle("Message deleted") .WithTitle("Message deleted")
.WithCurrentTimestamp() .WithCurrentTimestamp()
.WithFooter($"User ID: {(cachedMsg == null ? "Unknown" : cachedMsg.AuthorId)}"); .WithFooter($"Message ID: {argMsg.Id}");
if (cachedMsg != null) { if (cachedMsg != null) {
if (cachedMsg.Content == null) { if (cachedMsg.Content == null) {
@ -80,7 +80,7 @@ internal partial class ModLogs {
var reportEmbed = new EmbedBuilder() var reportEmbed = new EmbedBuilder()
.WithTitle("Message edited") .WithTitle("Message edited")
.WithCurrentTimestamp() .WithCurrentTimestamp()
.WithFooter($"User ID: {newMsg.Author.Id}"); .WithFooter($"Message ID: {newMsg.Id}");
reportEmbed.Author = new EmbedAuthorBuilder() { reportEmbed.Author = new EmbedAuthorBuilder() {
Name = $"{newMsg.Author.Username}#{newMsg.Author.Discriminator}", Name = $"{newMsg.Author.Username}#{newMsg.Author.Discriminator}",
@ -138,7 +138,6 @@ internal partial class ModLogs {
contextStr.AppendLine($"User: {userDisplay}"); contextStr.AppendLine($"User: {userDisplay}");
contextStr.AppendLine($"Channel: <#{channel.Id}> (#{channel.Name})"); contextStr.AppendLine($"Channel: <#{channel.Id}> (#{channel.Name})");
contextStr.AppendLine(editLine); contextStr.AppendLine(editLine);
contextStr.AppendLine($"Message ID: {msgId}");
e.AddField(new EmbedFieldBuilder() { e.AddField(new EmbedFieldBuilder() {
Name = "Context", Name = "Context",