Java 类net.dv8tion.jda.core.entities.impl.UserImpl 实例源码

项目:JDA    文件:AuditLogEntry.java   
public AuditLogEntry(ActionType type, long id, long targetId, GuildImpl guild, UserImpl user, String reason,
                     Map<String, AuditLogChange> changes, Map<String, Object> options)
{
    this.type = type;
    this.id = id;
    this.targetId = targetId;
    this.guild = guild;
    this.user = user;
    this.reason = reason;
    this.changes = changes != null && !changes.isEmpty()
            ? Collections.unmodifiableMap(changes)
            : Collections.emptyMap();
    this.options = options != null && !options.isEmpty()
            ? Collections.unmodifiableMap(options)
            : Collections.emptyMap();
}
项目:SqlSauce    文件:DiscordUser.java   
@Nonnull
public String getEffectiveAvatarUrl() { //ty JDA
    final String avatarUrl = getAvatarUrl();
    return avatarUrl != null ? avatarUrl
            : "https://discordapp.com/assets/"
            + UserImpl.DefaultAvatar.values()[this.discriminator % UserImpl.DefaultAvatar.values().length].toString()
            + ".png";
}
项目:JDA    文件:WidgetUtil.java   
/**
 * Gets the asset id of the member's default avatar
 * 
 * @return never-null String containing the asset id of the member's
 *         default avatar
 */
public String getDefaultAvatarId()
{
    return UserImpl.DefaultAvatar.values()[Integer.parseInt(getDiscriminator()) % UserImpl.DefaultAvatar.values().length].toString();
}