a lot of logs to pinpoint cpu usage on some systems

This commit is contained in:
Master Kwoth
2017-07-05 18:15:46 +02:00
parent 269a4e3157
commit 42923c5272
3 changed files with 17 additions and 4 deletions

View File

@ -108,6 +108,7 @@ namespace NadekoBot.Modules.Music
int index;
try
{
_log.Info("Added");
index = mp.Enqueue(songInfo);
}
catch (QueueFullException)
@ -169,11 +170,13 @@ namespace NadekoBot.Modules.Music
[RequireContext(ContextType.Guild)]
public async Task Queue([Remainder] string query)
{
_log.Info("Getting player");
var mp = await _music.GetOrCreatePlayer(Context);
_log.Info("Resolving song");
var songInfo = await _music.ResolveSong(query, Context.User.ToString());
_log.Info("Queueing song");
try { await InternalQueue(mp, songInfo, false); } catch (QueueFullException) { return; }
_log.Info("--------------");
if ((await Context.Guild.GetCurrentUserAsync()).GetPermissions((IGuildChannel)Context.Channel).ManageMessages)
{
Context.Message.DeleteAfter(10);