Example #1
0
 public DCUser(IDCUser user)
 {
     Native     = user;
     Name       = user.Username;
     IconUrl    = user.GetAvatarUrl();
     ScreenName = (user as IGuildUser)?.Nickname ?? Name;
     Id         = user.Username + "#" + user.DiscriminatorValue;
     IsBot      = user.IsBot || user.IsWebhook;
 }
Example #2
0
        public async Task PingCommand(Discord.IUser user = null)
        {
            user = UserUtil.GetMessageUser(Context, user);

            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.AppendLine($"Criado em: {user.CreatedAt.DateTime}");
            stringBuilder.AppendLine(user.IsBot ? "Usuário é bot" : "Usuário não é um bot");
            stringBuilder.AppendLine($"Status: {user.Status}");

            var embed = new EmbedBuilder
            {
                Title       = $"{user.Username}",
                ImageUrl    = user.GetAvatarUrl(),
                Color       = Color.DarkBlue,
                Description = stringBuilder.ToString()
            };

            await ReplyAsync(embed : embed.Build());
        }