From 5ad979f69c85c13b90c7d3c955b1fd20b6836143 Mon Sep 17 00:00:00 2001 From: primetime43 <12754111+primetime43@users.noreply.github.com> Date: Sun, 17 May 2026 11:11:39 -0400 Subject: [PATCH] Adapt DeleteMessagesCommand to upstream CliFx + PowerKit changes Upstream replaced CliFx.Attributes with CliFx.Binding and now requires command classes to be partial. Pipe() was also moved from DiscordChatExporter.Core.Utils.Extensions to PowerKit.Extensions. --- .../Commands/DeleteMessagesCommand.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/DiscordChatExporter.Cli/Commands/DeleteMessagesCommand.cs b/DiscordChatExporter.Cli/Commands/DeleteMessagesCommand.cs index 186afaee..797b2135 100644 --- a/DiscordChatExporter.Cli/Commands/DeleteMessagesCommand.cs +++ b/DiscordChatExporter.Cli/Commands/DeleteMessagesCommand.cs @@ -1,35 +1,35 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; -using CliFx.Attributes; +using CliFx.Binding; using CliFx.Infrastructure; using DiscordChatExporter.Cli.Commands.Base; using DiscordChatExporter.Core.Discord; -using DiscordChatExporter.Core.Utils.Extensions; +using PowerKit.Extensions; namespace DiscordChatExporter.Cli.Commands; [Command("deletemessages", Description = "Deletes messages from a channel.")] -public class DeleteMessagesCommand : DiscordCommandBase +public partial class DeleteMessagesCommand : DiscordCommandBase { [CommandOption( "channel", 'c', Description = "Channel ID. Note: You can only delete your own messages in DMs." )] - public required Snowflake ChannelId { get; init; } + public required Snowflake ChannelId { get; set; } [CommandOption( "before", Description = "Limit to messages sent before this date (formatted using the current culture)." )] - public DateTimeOffset? Before { get; init; } + public DateTimeOffset? Before { get; set; } [CommandOption( "after", Description = "Limit to messages sent after this date (formatted using the current culture)." )] - public DateTimeOffset? After { get; init; } + public DateTimeOffset? After { get; set; } public override async ValueTask ExecuteAsync(IConsole console) {