diff --git a/src/NadekoBot/Modules/Administration/AdministrationModule.cs b/src/NadekoBot/Modules/Administration/AdministrationModule.cs index 05011cba..29e2132d 100644 --- a/src/NadekoBot/Modules/Administration/AdministrationModule.cs +++ b/src/NadekoBot/Modules/Administration/AdministrationModule.cs @@ -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; diff --git a/src/NadekoBot/NadekoBot.cs b/src/NadekoBot/NadekoBot.cs index c9ea9c23..9131238e 100644 --- a/src/NadekoBot/NadekoBot.cs +++ b/src/NadekoBot/NadekoBot.cs @@ -36,7 +36,6 @@ namespace NadekoBot AudioMode = Discord.Audio.AudioMode.Incoming, LargeThreshold = 200, LogLevel = LogSeverity.Warning, - MessageCacheSize = 10, }); //initialize Services diff --git a/src/NadekoBot/Services/Impl/YoutubeService.cs b/src/NadekoBot/Services/Impl/YoutubeService.cs index 31655950..bcc44fa2 100644 --- a/src/NadekoBot/Services/Impl/YoutubeService.cs +++ b/src/NadekoBot/Services/Impl/YoutubeService.cs @@ -22,8 +22,14 @@ namespace NadekoBot.Services.Impl } public async Task> FindPlaylistIdsByKeywordsAsync(string keywords, int count = 1) { - Contract.Requires(!string.IsNullOrWhiteSpace(keywords)); - Contract.Requires(count > 0); + //Contract.Requires(!string.IsNullOrWhiteSpace(keywords)); + //Contract.Requires(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=)(?[\\da-zA-Z\\-_]*)").Match(keywords); if (match.Length > 1)