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