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(); }
@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"; }
/** * 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(); }