DiscordGuild

data class DiscordGuild(val id: Snowflake, val name: String, val icon: String?, val iconHash: Optional<String?> = Optional.Missing(), val splash: Optional<String?> = Optional.Missing(), val discoverySplash: Optional<String?> = Optional.Missing(), val owner: OptionalBoolean = OptionalBoolean.Missing, val ownerId: Snowflake, val permissions: Optional<Permissions> = Optional.Missing(), val region: String, val afkChannelId: Snowflake?, val afkTimeout: DurationInSeconds, val widgetEnabled: OptionalBoolean = OptionalBoolean.Missing, val widgetChannelId: OptionalSnowflake? = OptionalSnowflake.Missing, val verificationLevel: VerificationLevel, val defaultMessageNotifications: DefaultMessageNotificationLevel, val explicitContentFilter: ExplicitContentFilter, val roles: List<DiscordRole>, val emojis: List<DiscordEmoji>, val features: List<GuildFeature>, val mfaLevel: MFALevel, val applicationId: Snowflake?, val systemChannelId: Snowflake?, val systemChannelFlags: SystemChannelFlags, val rulesChannelId: Snowflake?, val joinedAt: Optional<Instant> = Optional.Missing(), val large: OptionalBoolean = OptionalBoolean.Missing, val unavailable: OptionalBoolean = OptionalBoolean.Missing, val memberCount: OptionalInt = OptionalInt.Missing, val voiceStates: Optional<List<DiscordVoiceState>> = Optional.Missing(), val members: Optional<List<DiscordGuildMember>> = Optional.Missing(), val channels: Optional<List<DiscordChannel>> = Optional.Missing(), val threads: Optional<List<DiscordChannel>> = Optional.Missing(), val presences: Optional<List<DiscordPresenceUpdate>> = Optional.Missing(), val maxPresences: OptionalInt? = OptionalInt.Missing, val maxMembers: OptionalInt = OptionalInt.Missing, val vanityUrlCode: String?, val description: String?, val banner: String?, val premiumTier: PremiumTier, val premiumSubscriptionCount: OptionalInt = OptionalInt.Missing, val preferredLocale: String, val publicUpdatesChannelId: Snowflake?, val maxVideoChannelUsers: OptionalInt = OptionalInt.Missing, val maxStageVideoChannelUsers: OptionalInt = OptionalInt.Missing, val approximateMemberCount: OptionalInt = OptionalInt.Missing, val approximatePresenceCount: OptionalInt = OptionalInt.Missing, val welcomeScreen: Optional<DiscordWelcomeScreen> = Optional.Missing(), val nsfwLevel: NsfwLevel, val stageInstances: Optional<List<DiscordStageInstance>> = Optional.Missing(), val stickers: Optional<List<DiscordMessageSticker>> = Optional.Missing(), val guildScheduledEvents: Optional<List<DiscordGuildScheduledEvent>> = Optional.Missing(), val premiumProgressBarEnabled: Boolean, val safetyAlertsChannelId: Snowflake?)(source)

A representation of a Discord Guild structure

Parameters

id

The guild id.

name

The guild name (2-100 characters, excluding trailing and leading whitespace)

icon

The icon hash.

iconHash

The icon hash, returned when in the template object.

splash

The splash hash.

discoverySplash

The discovery splash hash; only present for guilds with the GuildFeature.Discoverable feature.

owner

True if DiscordUser is the owner of the guild.

ownerId

The id of the owner.

permissions

The total permissions for DiscordUser in the guild (excludes overwrites).

region

DiscordVoiceRegion id for the guild.

afkChannelId

The id of afk channel.

afkTimeout

The afk timeout.

widgetEnabled

True if the server widget is enabled.

widgetChannelId

The channel id that the widget will generate an invite to, or null if set to no invite.

verificationLevel

VerificationLevel required for the guild.

defaultMessageNotifications
explicitContentFilter
roles

The roles in the guild.

emojis

The custom guild emojis.

features

The enabled guild features.

mfaLevel

The required MFALevel for the guild.

applicationId

The application id of the guild creator if it is bot-created.

systemChannelId

The id of the channel where guild notices such as welcome messages and boost events are posted.

systemChannelFlags
rulesChannelId

The id of the channel where Community guilds can display rules and/or guidelines.

joinedAt

When this guild was joined at.

large

True if this is considered a large guild.

unavailable

True if this guild is unavailable due to an outage.

memberCount

The total number of members in this guild.

voiceStates

The states of members currently in voice channels; lacks the DiscordVoiceState.guildId key.

members

The users in the guild.

channels

The channels in the guild.

presences

The presences of the members in the guild, will only include non-offline members if the size is greater than large threshold.

maxPresences

The maximum number of presences for the guild (the default value, currently 25000, is in effect when null is returned).

maxMembers

The maximum number of members for the guild.

vanityUrlCode

The vanity url code for the guild.

description

The description for the guild.

banner

The banner hash.

premiumTier

The PremiumTier (Server Boost level).

premiumSubscriptionCount

The number of boosts this guild currently has.

preferredLocale

The preferred locale of a Community guild; used in server discovery and notices from Discord; defaults to "en-US".

publicUpdatesChannelId

The id of the channel where admins and moderators of Community guilds receive notices from Discord.

maxVideoChannelUsers

The maximum amount of users in a video channel.

maxStageVideoChannelUsers

The maximum amount of users in a stage video channel.

approximateMemberCount

The approximate number of members in this guild, returned from the GET /guild/<id> endpoint when with_counts is true.

approximatePresenceCount

The approximate number of non-offline members in this guild, returned from the GET /guild/<id> endpoint when with_counts is true.

welcomeScreen

The welcome screen of a Community guild, shown to new members.

nsfwLevel

Guild NSFW level.

Constructors

Link copied to clipboard
constructor(id: Snowflake, name: String, icon: String?, iconHash: Optional<String?> = Optional.Missing(), splash: Optional<String?> = Optional.Missing(), discoverySplash: Optional<String?> = Optional.Missing(), owner: OptionalBoolean = OptionalBoolean.Missing, ownerId: Snowflake, permissions: Optional<Permissions> = Optional.Missing(), region: String, afkChannelId: Snowflake?, afkTimeout: DurationInSeconds, widgetEnabled: OptionalBoolean = OptionalBoolean.Missing, widgetChannelId: OptionalSnowflake? = OptionalSnowflake.Missing, verificationLevel: VerificationLevel, defaultMessageNotifications: DefaultMessageNotificationLevel, explicitContentFilter: ExplicitContentFilter, roles: List<DiscordRole>, emojis: List<DiscordEmoji>, features: List<GuildFeature>, mfaLevel: MFALevel, applicationId: Snowflake?, systemChannelId: Snowflake?, systemChannelFlags: SystemChannelFlags, rulesChannelId: Snowflake?, joinedAt: Optional<Instant> = Optional.Missing(), large: OptionalBoolean = OptionalBoolean.Missing, unavailable: OptionalBoolean = OptionalBoolean.Missing, memberCount: OptionalInt = OptionalInt.Missing, voiceStates: Optional<List<DiscordVoiceState>> = Optional.Missing(), members: Optional<List<DiscordGuildMember>> = Optional.Missing(), channels: Optional<List<DiscordChannel>> = Optional.Missing(), threads: Optional<List<DiscordChannel>> = Optional.Missing(), presences: Optional<List<DiscordPresenceUpdate>> = Optional.Missing(), maxPresences: OptionalInt? = OptionalInt.Missing, maxMembers: OptionalInt = OptionalInt.Missing, vanityUrlCode: String?, description: String?, banner: String?, premiumTier: PremiumTier, premiumSubscriptionCount: OptionalInt = OptionalInt.Missing, preferredLocale: String, publicUpdatesChannelId: Snowflake?, maxVideoChannelUsers: OptionalInt = OptionalInt.Missing, maxStageVideoChannelUsers: OptionalInt = OptionalInt.Missing, approximateMemberCount: OptionalInt = OptionalInt.Missing, approximatePresenceCount: OptionalInt = OptionalInt.Missing, welcomeScreen: Optional<DiscordWelcomeScreen> = Optional.Missing(), nsfwLevel: NsfwLevel, stageInstances: Optional<List<DiscordStageInstance>> = Optional.Missing(), stickers: Optional<List<DiscordMessageSticker>> = Optional.Missing(), guildScheduledEvents: Optional<List<DiscordGuildScheduledEvent>> = Optional.Missing(), premiumProgressBarEnabled: Boolean, safetyAlertsChannelId: Snowflake?)

Properties

Link copied to clipboard
@SerialName(value = "afk_channel_id")
val afkChannelId: Snowflake?
Link copied to clipboard
@SerialName(value = "afk_timeout")
val afkTimeout: DurationInSeconds
Link copied to clipboard
@SerialName(value = "application_id")
val applicationId: Snowflake?
Link copied to clipboard
@SerialName(value = "approximate_member_count")
val approximateMemberCount: OptionalInt
Link copied to clipboard
@SerialName(value = "approximate_presence_count")
val approximatePresenceCount: OptionalInt
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@SerialName(value = "default_message_notifications")
val defaultMessageNotifications: DefaultMessageNotificationLevel
Link copied to clipboard
Link copied to clipboard
@SerialName(value = "discovery_splash")
val discoverySplash: Optional<String?>
Link copied to clipboard
Link copied to clipboard
@SerialName(value = "explicit_content_filter")
val explicitContentFilter: ExplicitContentFilter
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val icon: String?
Link copied to clipboard
@SerialName(value = "icon_hash")
val iconHash: Optional<String?>
Link copied to clipboard
Link copied to clipboard
@SerialName(value = "joined_at")
val joinedAt: Optional<Instant>
Link copied to clipboard
Link copied to clipboard
@SerialName(value = "max_members")
val maxMembers: OptionalInt
Link copied to clipboard
@SerialName(value = "max_presences")
val maxPresences: OptionalInt?
Link copied to clipboard
@SerialName(value = "max_stage_video_channel_users")
val maxStageVideoChannelUsers: OptionalInt
Link copied to clipboard
@SerialName(value = "max_video_channel_users")
val maxVideoChannelUsers: OptionalInt
Link copied to clipboard
@SerialName(value = "member_count")
val memberCount: OptionalInt
Link copied to clipboard
Link copied to clipboard
@SerialName(value = "mfa_level")
val mfaLevel: MFALevel
Link copied to clipboard
Link copied to clipboard
@SerialName(value = "nsfw_level")
val nsfwLevel: NsfwLevel
Link copied to clipboard
Link copied to clipboard
@SerialName(value = "owner_id")
val ownerId: Snowflake
Link copied to clipboard
Link copied to clipboard
@SerialName(value = "preferred_locale")
val preferredLocale: String
Link copied to clipboard
@SerialName(value = "premium_progress_bar_enabled")
val premiumProgressBarEnabled: Boolean
Link copied to clipboard
@SerialName(value = "premium_subscription_count")
val premiumSubscriptionCount: OptionalInt
Link copied to clipboard
@SerialName(value = "premium_tier")
val premiumTier: PremiumTier
Link copied to clipboard
Link copied to clipboard
@SerialName(value = "public_updates_channel_id")
val publicUpdatesChannelId: Snowflake?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@SerialName(value = "rules_channel_id")
val rulesChannelId: Snowflake?
Link copied to clipboard
@SerialName(value = "safety_alerts_channel_id")
val safetyAlertsChannelId: Snowflake?
Link copied to clipboard
Link copied to clipboard
@SerialName(value = "stage_instances")
val stageInstances: Optional<List<DiscordStageInstance>>
Link copied to clipboard
Link copied to clipboard
@SerialName(value = "system_channel_flags")
val systemChannelFlags: SystemChannelFlags
Link copied to clipboard
@SerialName(value = "system_channel_id")
val systemChannelId: Snowflake?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
@SerialName(value = "vanity_url_code")
val vanityUrlCode: String?
Link copied to clipboard
@SerialName(value = "verification_level")
val verificationLevel: VerificationLevel
Link copied to clipboard
@SerialName(value = "voice_states")
val voiceStates: Optional<List<DiscordVoiceState>>
Link copied to clipboard
@SerialName(value = "welcome_screen")
val welcomeScreen: Optional<DiscordWelcomeScreen>
Link copied to clipboard
@SerialName(value = "widget_channel_id")
val widgetChannelId: OptionalSnowflake?
Link copied to clipboard
@SerialName(value = "widget_enabled")
val widgetEnabled: OptionalBoolean