diff --git a/src/Commands/Common/TagCommand/TagCommand.Update.cs b/src/Commands/Common/TagCommand/TagCommand.Update.cs index fd33be9..bd11f7c 100644 --- a/src/Commands/Common/TagCommand/TagCommand.Update.cs +++ b/src/Commands/Common/TagCommand/TagCommand.Update.cs @@ -2,6 +2,7 @@ using DSharpPlus; using DSharpPlus.Commands; using DSharpPlus.Commands.ArgumentModifiers; +using DSharpPlus.Commands.Trees.Metadata; using OoLunar.Tomoe.Database.Models; namespace OoLunar.Tomoe.Commands.Common @@ -13,7 +14,7 @@ public sealed partial class TagCommand /// /// The name of the tag to update. /// The new content that the text wall should contain. - [Command("update")] + [Command("update"), TextAlias("edit")] public static async ValueTask UpdateTagAsync(CommandContext context, string name, [RemainingText] string content) { if (!TryVerifyTagName(await context.GetCultureAsync(), ref name, out string? error)) diff --git a/src/Database/Models/TagHistoryModel.cs b/src/Database/Models/TagHistoryModel.cs index cbbca58..98385c9 100644 --- a/src/Database/Models/TagHistoryModel.cs +++ b/src/Database/Models/TagHistoryModel.cs @@ -65,6 +65,7 @@ public static async ValueTask CreateRevisionAsync(TagModel tag) _newRevision.Parameters["@owner_id"].Value = (long)tag.OwnerId; _newRevision.Parameters["@guild_id"].Value = (long)tag.GuildId; _newRevision.Parameters["@last_updated_at"].Value = DateTime.UtcNow; + _newRevision.Parameters["@uses"].Value = (long)tag.Uses; await _newRevision.ExecuteNonQueryAsync(); }