本文整理汇总了Java中net.dv8tion.jda.core.entities.impl.UserImpl类的典型用法代码示例。如果您正苦于以下问题:Java UserImpl类的具体用法?Java UserImpl怎么用?Java UserImpl使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
UserImpl类属于net.dv8tion.jda.core.entities.impl包,在下文中一共展示了UserImpl类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: AuditLogEntry
import net.dv8tion.jda.core.entities.impl.UserImpl; //导入依赖的package包/类
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();
}
示例2: getEffectiveAvatarUrl
import net.dv8tion.jda.core.entities.impl.UserImpl; //导入依赖的package包/类
@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";
}
示例3: getDefaultAvatarId
import net.dv8tion.jda.core.entities.impl.UserImpl; //导入依赖的package包/类
/**
* 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();
}