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 classes/interfaces inherited from interface com.mewna.catnip.entity.guild.Guild
Guild.ContentFilterLevel, Guild.GuildEditFields, Guild.MFALevel, Guild.NotificationLevel, Guild.PremiumTier, Guild.VerificationLevel
Nested 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
ConstructorDescriptionGuildImpl
(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 TypeMethodDescriptionlong
afkChannelIdAsLong
(long afkChannelIdAsLong) int
afkTimeout
(int afkTimeout) long
applicationIdAsLong
(long applicationIdAsLong) int
approximateMemberCount
(int approximateMemberCount) int
approximatePresenceCount
(int approximatePresenceCount) banner()
static GuildImpl.GuildImplBuilder
builder()
catnip()
Returns the catnip instance associated with this entity.void
defaultMessageNotifications
(Guild.NotificationLevel defaultMessageNotifications) description
(String description) boolean
explicitContentFilter
(Guild.ContentFilterLevel explicitContentFilter) features()
features
(List<GuildFeature> features) int
hashCode()
icon()
iconUrl
(ImageOptions options) long
idAsLong()
The ID of this snowflake, as a long.idAsLong
(long idAsLong) joinedAt()
boolean
large()
large
(boolean large) int
maxMembers
(int maxMembers) int
maxPresences
(int maxPresences) mfaLevel()
mfaLevel
(Guild.MFALevel mfaLevel) name()
boolean
owned()
owned
(boolean owned) long
ownerIdAsLong
(long ownerIdAsLong) permissions
(Set<Permission> permissions) preferredLocale
(String preferredLocale) int
premiumSubscriptionCount
(int premiumSubscriptionCount) premiumTier
(Guild.PremiumTier premiumTier) region()
splash()
splashUrl
(ImageOptions options) The CDN URL of the guild's splash image.long
systemChannelIdAsLong
(long systemChannelIdAsLong) toString()
boolean
unavailable
(boolean unavailable) vanityUrlCode
(String vanityUrlCode) verificationLevel
(Guild.VerificationLevel verificationLevel) long
widgetChannelIdAsLong
(long widgetChannelIdAsLong) boolean
widgetEnabled
(boolean widgetEnabled) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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, widgetChannelId
Methods inherited from interface com.mewna.catnip.entity.partials.HasApplication
applicationId
Methods inherited from interface com.mewna.catnip.entity.partials.Snowflake
creationTime, creationTimestamp, id
Methods 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:
catnip
in interfaceRequiresCatnip
-
iconUrl
- Specified by:
iconUrl
in 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:Guild
The CDN URL of the guild's splash image. -
joinedAt
-
hashCode
public int hashCode() -
equals
-
toString
-
builder
-
catnip
Description copied from interface:Entity
Returns the catnip instance associated with this entity. -
idAsLong
public long idAsLong()Description copied from interface:Snowflake
The ID of this snowflake, as a long. -
name
-
icon
-
splash
-
owned
public boolean owned() -
ownerIdAsLong
public long ownerIdAsLong()- Specified by:
ownerIdAsLong
in interfaceGuild
- Specified by:
ownerIdAsLong
in interfaceHasOwner
- Returns:
- The id of the user who owns the guild.
-
permissions
- Specified by:
permissions
in interfaceGuild
- Returns:
- Total permissions for the user in the guild. Does NOT include channel overrides.
-
region
-
afkChannelIdAsLong
public long afkChannelIdAsLong()- Specified by:
afkChannelIdAsLong
in interfaceGuild
- Returns:
- The id of the afk voice channel for the guild.
-
afkTimeout
public int afkTimeout()- Specified by:
afkTimeout
in interfaceGuild
- Returns:
- The amount of time a user must be afk for before they're moved to the afk channel.
-
verificationLevel
- Specified by:
verificationLevel
in interfaceGuild
- Returns:
- The verification level set for the guild.
-
defaultMessageNotifications
- Specified by:
defaultMessageNotifications
in interfaceGuild
- Returns:
- The notification level set for the guild.
-
explicitContentFilter
- Specified by:
explicitContentFilter
in interfaceGuild
- Returns:
- The explicit content filter level set for the guild.
-
features
-
mfaLevel
-
applicationIdAsLong
public long applicationIdAsLong()- Specified by:
applicationIdAsLong
in interfaceHasApplication
- Returns:
- The id of the application that this entity belongs to.
-
widgetEnabled
public boolean widgetEnabled()- Specified by:
widgetEnabled
in interfaceGuild
- Returns:
- Whether or not the guild's widget is enabled.
-
widgetChannelIdAsLong
public long widgetChannelIdAsLong()- Specified by:
widgetChannelIdAsLong
in interfaceGuild
- Returns:
- The channel the guild's widget is set for, if enabled.
-
systemChannelIdAsLong
public long systemChannelIdAsLong()- Specified by:
systemChannelIdAsLong
in 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:
maxPresences
in interfaceGuild
- Returns:
- The maximum number of presences the guild can have. Will be
0
if no value was present.
-
maxMembers
public int maxMembers()- Specified by:
maxMembers
in interfaceGuild
- Returns:
- The maximum number of members the guild can have. Will be
0
if no value was present.
-
approximateMemberCount
public int approximateMemberCount()- Specified by:
approximateMemberCount
in interfaceGuild
- Returns:
- The approximate member count the guild currently has. Will be
0
if no value was present.
-
approximatePresenceCount
public int approximatePresenceCount()- Specified by:
approximatePresenceCount
in interfaceGuild
- Returns:
- The approximate presence count the guild currently has. Will be
0
if no value was present.
-
vanityUrlCode
- Specified by:
vanityUrlCode
in interfaceGuild
- Returns:
- The vanity invite code for this guild, ie.
discord.gg/vanity_code
.
-
description
- Specified by:
description
in interfaceHasNullableDescription
- Returns:
- The entity's description. May be null.
-
banner
-
preferredLocale
- Specified by:
preferredLocale
in interfaceGuild
- Returns:
- The preferred locale for this guild. Defaults to
en-US
. Is only modifiable on guilds that haveGuildFeature.DISCOVERABLE
set.
-
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
.
-