mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 01:38:27 -04:00
Fixed .prune @Target not working bug
This commit is contained in:
@@ -1,15 +1,14 @@
|
|||||||
#nullable disable
|
using CommandLine;
|
||||||
using CommandLine;
|
|
||||||
|
|
||||||
namespace NadekoBot.Common;
|
namespace NadekoBot.Common;
|
||||||
|
|
||||||
public static class OptionsParser
|
public static class OptionsParser
|
||||||
{
|
{
|
||||||
public static T ParseFrom<T>(string[] args)
|
public static T ParseFrom<T>(string[]? args)
|
||||||
where T : INadekoCommandOptions, new()
|
where T : INadekoCommandOptions, new()
|
||||||
=> ParseFrom(new T(), args).Item1;
|
=> ParseFrom(new T(), args).Item1;
|
||||||
|
|
||||||
public static (T, bool) ParseFrom<T>(T options, string[] args)
|
public static (T, bool) ParseFrom<T>(T options, string[]? args)
|
||||||
where T : INadekoCommandOptions
|
where T : INadekoCommandOptions
|
||||||
{
|
{
|
||||||
using var p = new Parser(x =>
|
using var p = new Parser(x =>
|
||||||
|
@@ -72,7 +72,7 @@ public partial class Administration
|
|||||||
[BotPerm(ChannelPerm.ManageMessages)]
|
[BotPerm(ChannelPerm.ManageMessages)]
|
||||||
[NadekoOptions(typeof(PruneOptions))]
|
[NadekoOptions(typeof(PruneOptions))]
|
||||||
[Priority(0)]
|
[Priority(0)]
|
||||||
public Task Prune(IGuildUser user, int count = 100, string args = null)
|
public Task Prune(IGuildUser user, int count = 100, params string[] args)
|
||||||
=> Prune(user.Id, count, args);
|
=> Prune(user.Id, count, args);
|
||||||
|
|
||||||
//prune userid [x]
|
//prune userid [x]
|
||||||
|
Reference in New Issue
Block a user