diff --git a/Hammer/CommandModules/Staff/StaffModule.ViewNote.cs b/Hammer/CommandModules/Staff/StaffModule.ViewNote.cs index c341daf..baf0a29 100644 --- a/Hammer/CommandModules/Staff/StaffModule.ViewNote.cs +++ b/Hammer/CommandModules/Staff/StaffModule.ViewNote.cs @@ -51,6 +51,8 @@ public async Task ViewNoteCommandAsync(CommandContext context, string timestamp = Formatter.Timestamp(note.CreationTimestamp, TimestampFormat.ShortDateTime); embed.WithAuthor(user); + embed.AddField(EmbedFieldNames.NoteID, note.Id, true); + embed.AddField(EmbedFieldNames.NoteType, note.Type.ToString("G"), true); embed.AddField(EmbedFieldNames.Author, author.Mention, true); embed.AddField(EmbedFieldNames.CreationTime, timestamp, true); embed.AddField(EmbedFieldNames.Content, note.Content); diff --git a/Hammer/Resources/EmbedFieldNames.Designer.cs b/Hammer/Resources/EmbedFieldNames.Designer.cs index 3168a0f..2369324 100644 --- a/Hammer/Resources/EmbedFieldNames.Designer.cs +++ b/Hammer/Resources/EmbedFieldNames.Designer.cs @@ -150,6 +150,15 @@ internal static string NoteID { } } + /// + /// Looks up a localized string similar to __Note Type__. + /// + internal static string NoteType { + get { + return ResourceManager.GetString("NoteType", resourceCulture); + } + } + /// /// Looks up a localized string similar to __Reason__. /// diff --git a/Hammer/Resources/EmbedFieldNames.resx b/Hammer/Resources/EmbedFieldNames.resx index b5b2079..65b0108 100644 --- a/Hammer/Resources/EmbedFieldNames.resx +++ b/Hammer/Resources/EmbedFieldNames.resx @@ -50,6 +50,9 @@ __Note ID__ + + __Note Type__ + __Message Time__ diff --git a/Hammer/Services/MemberNoteService.cs b/Hammer/Services/MemberNoteService.cs index e00f3ae..c42892b 100644 --- a/Hammer/Services/MemberNoteService.cs +++ b/Hammer/Services/MemberNoteService.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Threading; @@ -14,6 +14,7 @@ using Microsoft.EntityFrameworkCore.ChangeTracking; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; +using SmartFormat; using PermissionLevel = BrackeysBot.Core.API.PermissionLevel; namespace Hammer.Services; @@ -87,6 +88,7 @@ public async Task CreateNoteAsync(DiscordUser user, DiscordMember au DiscordEmbedBuilder embed = guild.CreateDefaultEmbed(false); embed.WithTitle("Note Created"); embed.AddField(EmbedFieldNames.NoteID, note.Id, true); + embed.AddField(EmbedFieldNames.NoteType, note.Type.ToString("G"), true); embed.AddField(EmbedFieldNames.User, user.Mention, true); embed.AddField(EmbedFieldNames.Author, author.Mention, true); embed.AddField(EmbedFieldNames.Content, note.Content);