Name/avatar changes are ready to work, waiting for lib fix

This commit is contained in:
Kwoth 2017-01-07 20:40:10 +01:00
parent 55fd2c69bc
commit 8c2a94aeb8
2 changed files with 10 additions and 3 deletions

View File

@ -101,6 +101,9 @@ namespace NadekoBot.Modules.Administration
else if (before.AvatarUrl != after.AvatarUrl)
str = $"👤__**{before.Username}#{before.Discriminator}**__ **| Avatar Changed |** 🆔 `{before.Id}`\n\t🖼 {await NadekoBot.Google.ShortenUrl(before.AvatarUrl)} `=>` {await NadekoBot.Google.ShortenUrl(after.AvatarUrl)}";
if (string.IsNullOrWhiteSpace(str))
return;
var guildsMemberOf = NadekoBot.Client.GetGuilds().Where(g => g.Users.Select(u => u.Id).Contains(before.Id)).ToList();
foreach (var g in guildsMemberOf)
{
@ -110,7 +113,7 @@ namespace NadekoBot.Modules.Administration
return;
ITextChannel logChannel;
if ((logChannel = await TryGetLogChannel(g, logSetting, LogType.VoicePresenceTTS)) == null)
if ((logChannel = await TryGetLogChannel(g, logSetting, LogType.UserUpdated)) == null)
return;
try { await logChannel.SendMessageAsync(str).ConfigureAwait(false); } catch { }

View File

@ -223,9 +223,13 @@ namespace NadekoBot.Services
}
catch (Exception ex)
{
_log.Warn(ex, "Error in CommandHandler");
_log.Warn("Error in CommandHandler");
_log.Warn(ex);
if (ex.InnerException != null)
_log.Warn(ex.InnerException, "Inner Exception of the error in CommandHandler");
{
_log.Warn("Inner Exception of the error in CommandHandler");
_log.Warn(ex.InnerException);
}
}
return;