added nick and last online to .uinfo (will only work if those fields are set)
This commit is contained in:
parent
b7c8bf504c
commit
f359b2fadb
@ -83,9 +83,14 @@ namespace NadekoBot.Modules.Administration.Commands
|
|||||||
return;
|
return;
|
||||||
var sb = new StringBuilder();
|
var sb = new StringBuilder();
|
||||||
sb.AppendLine($"`Name#Discrim:` **#{user.Name}#{user.Discriminator}**");
|
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($"`Id:` **{user.Id}**");
|
||||||
sb.AppendLine($"`Current Game:` **{(string.IsNullOrWhiteSpace(user.CurrentGame) ? "-" : user.CurrentGame)}**");
|
sb.AppendLine($"`Current Game:` **{(string.IsNullOrWhiteSpace(user.CurrentGame) ? "-" : user.CurrentGame)}**");
|
||||||
sb.AppendLine($"`Joined At:` **{user.JoinedAt}**");
|
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($"`Roles:` **({user.Roles.Count()}) - {string.Join(", ", user.Roles.Select(r => r.Name))}**");
|
||||||
sb.AppendLine($"`AvatarUrl:` **{await user.AvatarUrl.ShortenUrl().ConfigureAwait(false)}**");
|
sb.AppendLine($"`AvatarUrl:` **{await user.AvatarUrl.ShortenUrl().ConfigureAwait(false)}**");
|
||||||
await e.Channel.SendMessage(sb.ToString()).ConfigureAwait(false);
|
await e.Channel.SendMessage(sb.ToString()).ConfigureAwait(false);
|
||||||
|
Loading…
Reference in New Issue
Block a user