Exemplo n.º 1
0
        public DiscordCommandResult UserInfo([Description("The user for whom you wish to receive information")] IMember member = null)
        {
            member ??= Context.Author;

            var roles   = member.GetRoles();
            var topRole = roles.Values.OrderByDescending(x => x.Position).First();

            var eb = new LocalEmbed()
                     .WithTitle(member.Tag)
                     .WithThumbnailUrl(member.GetAvatarUrl())
                     .WithColor(topRole.Color ?? LexGlobals.LexColor)
                     .AddField("Id", member.Id, true)
                     .AddField("Nickname", member.Nick ?? "No nickname in this guild", true)
                     .AddField("Is Bot", member.IsBot ? "Yes" : "No", true)
                     .AddField("Joined At", Markdown.Timestamp(member.JoinedAt.Value, Markdown.TimestampFormat.LongDateTime), true)
                     .AddField("Created At", Markdown.Timestamp(member.CreatedAt(), Markdown.TimestampFormat.LongDateTime));

            return(Response(eb));
        }