mirror of
https://github.com/Tyrrrz/DiscordChatExporter.git
synced 2026-06-10 00:02:37 -06:00
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.
This commit is contained in:
parent
c38953d868
commit
5ad979f69c
|
|
@ -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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue