Ejemplo n.º 1
0
        public async Task LookupSuspect(CommandContext context, [Description("The suspect.")] DiscordUser user)
        {
            var userDays = await user.GetDaysExisting();

            var userSinceDays = userDays == 1 ? $"yesterday" : userDays == 0 ? "today" : $"{Formatter.Bold($"{userDays}")} days";
            var description   = new StringBuilder().AppendLine($"Identity: {Formatter.InlineCode($"{user.Id}")}")
                                .AppendLine($"Registered: {await user.CreatedAtLongDateTimeString()} ({userSinceDays})")
                                .ToString();
            var embed = new Embed()
            {
                Author = new EmbedAuthor()
                {
                    Name = user.GetUsertag(),
                    Icon = user.AvatarUrl
                },
                Thumbnail   = user.AvatarUrl,
                Description = description
            };

            await context.SendEmbedMessageAsync(embed);
        }