mirror of
				https://gitlab.com/Kwoth/nadekobot.git
				synced 2025-11-04 00:34:26 -05: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;
 | 
			
		||||
 | 
			
		||||
public static class OptionsParser
 | 
			
		||||
{
 | 
			
		||||
    public static T ParseFrom<T>(string[] args)
 | 
			
		||||
    public static T ParseFrom<T>(string[]? args)
 | 
			
		||||
        where T : INadekoCommandOptions, new()
 | 
			
		||||
        => 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
 | 
			
		||||
    {
 | 
			
		||||
        using var p = new Parser(x =>
 | 
			
		||||
 
 | 
			
		||||
@@ -72,7 +72,7 @@ public partial class Administration
 | 
			
		||||
        [BotPerm(ChannelPerm.ManageMessages)]
 | 
			
		||||
        [NadekoOptions(typeof(PruneOptions))]
 | 
			
		||||
        [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 userid [x]
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user