Class GuildImpl
java.lang.Object
com.mewna.catnip.entity.impl.guild.GuildImpl
- All Implemented Interfaces:
Entity,Guild,HasApplication,HasIcon,HasName,HasNullableDescription,HasOwner,Snowflake,Timestamped,RequiresCatnip
- Since:
- 9/6/18.
- Author:
- natanbc
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface com.mewna.catnip.entity.guild.Guild
Guild.ContentFilterLevel, Guild.GuildEditFields, Guild.MFALevel, Guild.NotificationLevel, Guild.PremiumTier, Guild.VerificationLevelNested classes/interfaces inherited from interface com.mewna.catnip.entity.partials.Timestamped
Timestamped.TimestampStyle -
Field Summary
Fields inherited from interface com.mewna.catnip.entity.guild.Guild
NICKNAME_MAX_LENGTH -
Constructor Summary
ConstructorsConstructorDescriptionGuildImpl(Catnip catnip, long idAsLong, String name, String icon, String splash, boolean owned, long ownerIdAsLong, Set<Permission> permissions, String region, long afkChannelIdAsLong, int afkTimeout, Guild.VerificationLevel verificationLevel, Guild.NotificationLevel defaultMessageNotifications, Guild.ContentFilterLevel explicitContentFilter, List<GuildFeature> features, Guild.MFALevel mfaLevel, long applicationIdAsLong, boolean widgetEnabled, long widgetChannelIdAsLong, long systemChannelIdAsLong, String joinedAt, boolean large, boolean unavailable, int maxPresences, int maxMembers, int approximateMemberCount, int approximatePresenceCount, String vanityUrlCode, String description, String banner, Guild.PremiumTier premiumTier, int premiumSubscriptionCount, String preferredLocale) -
Method Summary
Modifier and TypeMethodDescriptionlongafkChannelIdAsLong(long afkChannelIdAsLong) intafkTimeout(int afkTimeout) longapplicationIdAsLong(long applicationIdAsLong) intapproximateMemberCount(int approximateMemberCount) intapproximatePresenceCount(int approximatePresenceCount) banner()static GuildImpl.GuildImplBuilderbuilder()catnip()Returns the catnip instance associated with this entity.voiddefaultMessageNotifications(Guild.NotificationLevel defaultMessageNotifications) description(String description) booleanexplicitContentFilter(Guild.ContentFilterLevel explicitContentFilter) features()features(List<GuildFeature> features) inthashCode()icon()iconUrl(ImageOptions options) longidAsLong()The ID of this snowflake, as a long.idAsLong(long idAsLong) joinedAt()booleanlarge()large(boolean large) intmaxMembers(int maxMembers) intmaxPresences(int maxPresences) mfaLevel()mfaLevel(Guild.MFALevel mfaLevel) name()booleanowned()owned(boolean owned) longownerIdAsLong(long ownerIdAsLong) permissions(Set<Permission> permissions) preferredLocale(String preferredLocale) intpremiumSubscriptionCount(int premiumSubscriptionCount) premiumTier(Guild.PremiumTier premiumTier) region()splash()splashUrl(ImageOptions options) The CDN URL of the guild's splash image.longsystemChannelIdAsLong(long systemChannelIdAsLong) toString()booleanunavailable(boolean unavailable) vanityUrlCode(String vanityUrlCode) verificationLevel(Guild.VerificationLevel verificationLevel) longwidgetChannelIdAsLong(long widgetChannelIdAsLong) booleanwidgetEnabled(boolean widgetEnabled) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.mewna.catnip.entity.guild.Guild
addRoleToMember, addRoleToMember, afkChannelId, ban, ban, ban, ban, category, category, changeNickName, changeNickName, channel, channel, channelPositionUpdater, channels, closeVoiceConnection, createChannel, createChannel, createEmoji, createEmoji, createEmoji, createEmoji, createRole, createRole, delete, deleteEmoji, deleteEmoji, edit, emoji, emoji, emojiByName, emojis, fetchChannels, fetchEmoji, fetchEmojis, fetchInvites, fetchRoles, fetchWebhooks, getEmbed, joinedAtTimestamp, kick, kick, kick, kick, kick, kick, leave, member, member, memberCount, members, modifyChannelPositions, modifyChannelPositions, modifyEmoji, modifyEmoji, modifyGuildEmbed, modifyGuildEmbed, modifyGuildMember, modifyGuildMember, modifyRolePositions, modifyRolePositions, owner, ownerId, ownerMember, removeRoleFromMember, removeRoleFromMember, role, role, rolePositionUpdater, roles, searchMembers, searchMembers, selfMember, splashUrl, systemChannelId, textChannel, textChannel, unban, unban, unban, unban, unban, unban, vanityInvite, voiceChannel, voiceChannel, voiceStates, widgetChannelIdMethods inherited from interface com.mewna.catnip.entity.partials.HasApplication
applicationIdMethods inherited from interface com.mewna.catnip.entity.partials.Snowflake
creationTime, creationTimestamp, idMethods inherited from interface com.mewna.catnip.entity.partials.Timestamped
asDiscordTimestamp, parseTimestamp
-
Constructor Details
-
GuildImpl
public GuildImpl() -
GuildImpl
public GuildImpl(Catnip catnip, long idAsLong, String name, String icon, String splash, boolean owned, long ownerIdAsLong, Set<Permission> permissions, String region, long afkChannelIdAsLong, int afkTimeout, Guild.VerificationLevel verificationLevel, Guild.NotificationLevel defaultMessageNotifications, Guild.ContentFilterLevel explicitContentFilter, List<GuildFeature> features, Guild.MFALevel mfaLevel, long applicationIdAsLong, boolean widgetEnabled, long widgetChannelIdAsLong, long systemChannelIdAsLong, String joinedAt, boolean large, boolean unavailable, int maxPresences, int maxMembers, int approximateMemberCount, int approximatePresenceCount, String vanityUrlCode, String description, String banner, Guild.PremiumTier premiumTier, int premiumSubscriptionCount, String preferredLocale)
-
-
Method Details
-
catnip
- Specified by:
catnipin interfaceRequiresCatnip
-
iconUrl
- Specified by:
iconUrlin interfaceHasIcon- Returns:
- The icon's CDN URL, with the specified options applied. Will be
null if
HasIcon.icon()is null, except in the case of aUser.
-
splashUrl
Description copied from interface:GuildThe CDN URL of the guild's splash image. -
joinedAt
-
hashCode
public int hashCode() -
equals
-
toString
-
builder
-
catnip
Description copied from interface:EntityReturns the catnip instance associated with this entity. -
idAsLong
public long idAsLong()Description copied from interface:SnowflakeThe ID of this snowflake, as a long. -
name
-
icon
-
splash
-
owned
public boolean owned() -
ownerIdAsLong
public long ownerIdAsLong()- Specified by:
ownerIdAsLongin interfaceGuild- Specified by:
ownerIdAsLongin interfaceHasOwner- Returns:
- The id of the user who owns the guild.
-
permissions
- Specified by:
permissionsin interfaceGuild- Returns:
- Total permissions for the user in the guild. Does NOT include channel overrides.
-
region
-
afkChannelIdAsLong
public long afkChannelIdAsLong()- Specified by:
afkChannelIdAsLongin interfaceGuild- Returns:
- The id of the afk voice channel for the guild.
-
afkTimeout
public int afkTimeout()- Specified by:
afkTimeoutin interfaceGuild- Returns:
- The amount of time a user must be afk for before they're moved to the afk channel.
-
verificationLevel
- Specified by:
verificationLevelin interfaceGuild- Returns:
- The verification level set for the guild.
-
defaultMessageNotifications
- Specified by:
defaultMessageNotificationsin interfaceGuild- Returns:
- The notification level set for the guild.
-
explicitContentFilter
- Specified by:
explicitContentFilterin interfaceGuild- Returns:
- The explicit content filter level set for the guild.
-
features
-
mfaLevel
-
applicationIdAsLong
public long applicationIdAsLong()- Specified by:
applicationIdAsLongin interfaceHasApplication- Returns:
- The id of the application that this entity belongs to.
-
widgetEnabled
public boolean widgetEnabled()- Specified by:
widgetEnabledin interfaceGuild- Returns:
- Whether or not the guild's widget is enabled.
-
widgetChannelIdAsLong
public long widgetChannelIdAsLong()- Specified by:
widgetChannelIdAsLongin interfaceGuild- Returns:
- The channel the guild's widget is set for, if enabled.
-
systemChannelIdAsLong
public long systemChannelIdAsLong()- Specified by:
systemChannelIdAsLongin interfaceGuild- Returns:
- The id of the channel used for system messages (ex. the built-in member join messages).
-
large
public boolean large() -
maxPresences
public int maxPresences()- Specified by:
maxPresencesin interfaceGuild- Returns:
- The maximum number of presences the guild can have. Will be
0if no value was present.
-
maxMembers
public int maxMembers()- Specified by:
maxMembersin interfaceGuild- Returns:
- The maximum number of members the guild can have. Will be
0if no value was present.
-
approximateMemberCount
public int approximateMemberCount()- Specified by:
approximateMemberCountin interfaceGuild- Returns:
- The approximate member count the guild currently has. Will be
0if no value was present.
-
approximatePresenceCount
public int approximatePresenceCount()- Specified by:
approximatePresenceCountin interfaceGuild- Returns:
- The approximate presence count the guild currently has. Will be
0if no value was present.
-
vanityUrlCode
- Specified by:
vanityUrlCodein interfaceGuild- Returns:
- The vanity invite code for this guild, ie.
discord.gg/vanity_code.
-
description
- Specified by:
descriptionin interfaceHasNullableDescription- Returns:
- The entity's description. May be null.
-
banner
-
preferredLocale
- Specified by:
preferredLocalein interfaceGuild- Returns:
- The preferred locale for this guild. Defaults to
en-US. Is only modifiable on guilds that haveGuildFeature.DISCOVERABLEset.
-
idAsLong
- Returns:
this.
-
name
- Returns:
this.
-
icon
- Returns:
this.
-
splash
- Returns:
this.
-
owned
- Returns:
this.
-
ownerIdAsLong
- Returns:
this.
-
permissions
- Returns:
this.
-
region
- Returns:
this.
-
afkChannelIdAsLong
- Returns:
this.
-
afkTimeout
- Returns:
this.
-
verificationLevel
- Returns:
this.
-
defaultMessageNotifications
- Returns:
this.
-
explicitContentFilter
- Returns:
this.
-
features
- Returns:
this.
-
mfaLevel
- Returns:
this.
-
applicationIdAsLong
- Returns:
this.
-
widgetEnabled
- Returns:
this.
-
widgetChannelIdAsLong
- Returns:
this.
-
systemChannelIdAsLong
- Returns:
this.
-
joinedAt
- Returns:
this.
-
large
- Returns:
this.
-
maxPresences
- Returns:
this.
-
maxMembers
- Returns:
this.
-
approximateMemberCount
- Returns:
this.
-
approximatePresenceCount
- Returns:
this.
-
vanityUrlCode
- Returns:
this.
-
description
- Returns:
this.
-
banner
- Returns:
this.
-
preferredLocale
- Returns:
this.
-