added nick and last online to .uinfo (will only work if those fields are set)

This commit is contained in:
Master Kwoth 2016-05-16 21:34:14 +02:00
parent b7c8bf504c
commit f359b2fadb

View File

@ -83,9 +83,14 @@ namespace NadekoBot.Modules.Administration.Commands
return;
var sb = new StringBuilder();
sb.AppendLine($"`Name#Discrim:` **#{user.Name}#{user.Discriminator}**");
if (!string.IsNullOrWhiteSpace(user.Nickname))
sb.AppendLine($"`Nickname:` **{user.Nickname}**");
sb.AppendLine($"`Id:` **{user.Id}**");
sb.AppendLine($"`Current Game:` **{(string.IsNullOrWhiteSpace(user.CurrentGame) ? "-" : user.CurrentGame)}**");
sb.AppendLine($"`Joined At:` **{user.JoinedAt}**");
if (user.LastOnlineAt != null)
sb.AppendLine($"`Last Online:` **{user.LastOnlineAt:HH:mm:ss}**");
sb.AppendLine($"`Joined At:` **{user.JoinedAt}**");
sb.AppendLine($"`Roles:` **({user.Roles.Count()}) - {string.Join(", ", user.Roles.Select(r => r.Name))}**");
sb.AppendLine($"`AvatarUrl:` **{await user.AvatarUrl.ShortenUrl().ConfigureAwait(false)}**");
await e.Channel.SendMessage(sb.ToString()).ConfigureAwait(false);