Fixed prune by removing cache? Fixed error on ~yt by removing contracts?
This commit is contained in:
		@@ -23,7 +23,13 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
        {
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
        [LocalizedCommand, LocalizedDescription, LocalizedSummary]
 | 
			
		||||
        [RequireContext(ContextType.Guild)]
 | 
			
		||||
        public async Task cmd(IMessage imsg, [Remainder] string arg)
 | 
			
		||||
        {
 | 
			
		||||
            var channel = imsg.Channel as ITextChannel;
 | 
			
		||||
 | 
			
		||||
        }
 | 
			
		||||
        ////todo owner only
 | 
			
		||||
        //[LocalizedCommand, LocalizedDescription, LocalizedSummary]
 | 
			
		||||
        //[RequireContext(ContextType.Guild)]
 | 
			
		||||
@@ -445,6 +451,7 @@ namespace NadekoBot.Modules.Administration
 | 
			
		||||
        public async Task Prune(IMessage msg, int count)
 | 
			
		||||
        {
 | 
			
		||||
            var channel = msg.Channel as ITextChannel;
 | 
			
		||||
            await msg.DeleteAsync();
 | 
			
		||||
            while (count > 0)
 | 
			
		||||
            {
 | 
			
		||||
                int limit = (count < 100) ? count : 100;
 | 
			
		||||
 
 | 
			
		||||
@@ -36,7 +36,6 @@ namespace NadekoBot
 | 
			
		||||
                AudioMode = Discord.Audio.AudioMode.Incoming,
 | 
			
		||||
                LargeThreshold = 200,
 | 
			
		||||
                LogLevel = LogSeverity.Warning,
 | 
			
		||||
                MessageCacheSize = 10,
 | 
			
		||||
            });
 | 
			
		||||
 | 
			
		||||
            //initialize Services
 | 
			
		||||
 
 | 
			
		||||
@@ -22,8 +22,14 @@ namespace NadekoBot.Services.Impl
 | 
			
		||||
        }
 | 
			
		||||
        public async Task<IEnumerable<string>> FindPlaylistIdsByKeywordsAsync(string keywords, int count = 1)
 | 
			
		||||
        {
 | 
			
		||||
            Contract.Requires<ArgumentNullException>(!string.IsNullOrWhiteSpace(keywords));
 | 
			
		||||
            Contract.Requires<ArgumentOutOfRangeException>(count > 0);
 | 
			
		||||
            //Contract.Requires<ArgumentNullException>(!string.IsNullOrWhiteSpace(keywords));
 | 
			
		||||
            //Contract.Requires<ArgumentOutOfRangeException>(count > 0);
 | 
			
		||||
 | 
			
		||||
            if (string.IsNullOrWhiteSpace(keywords))
 | 
			
		||||
                throw new ArgumentNullException(nameof(keywords));
 | 
			
		||||
 | 
			
		||||
            if (count <= 0)
 | 
			
		||||
                throw new ArgumentOutOfRangeException(nameof(count));
 | 
			
		||||
 | 
			
		||||
            var match = new Regex("(?:youtu\\.be\\/|list=)(?<id>[\\da-zA-Z\\-_]*)").Match(keywords);
 | 
			
		||||
            if (match.Length > 1)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user