DiscordPHP Documentation

GuildCreateData extends Guild
in package

Raw data received from the `GUILD_CREATE` event.

Tags
see
GuildCreate
link
https://discord.com/developers/docs/events/gateway-events#guild-create-guild-create-extra-fields
since
10.38.2

Table of Contents

Constants

EXPLICIT_CONTENT_FILTER_ALL_MEMBERS  = 2
Media content sent by all members will be scanned.
EXPLICIT_CONTENT_FILTER_DISABLED  = 0
Media content will not be scanned.
EXPLICIT_CONTENT_FILTER_MEMBERS_WITHOUT_ROLES  = 1
Media content sent by members without roles will be scanned.
HUB_TYPE_COLLEGE  = 2
HUB_TYPE_DEFAULT  = 0
HUB_TYPE_HIGH_SCHOOL  = 1
LEVEL_DOUBLE_TABLEFLIP  = self::LEVEL_VERY_HIGH
LEVEL_HIGH  = 3
Must be a member of the server for longer than 10 minutes.
LEVEL_LOW  = 1
Must have verified email on account.
LEVEL_MEDIUM  = 2
Must be registered on Discord for longer than 5 minutes.
LEVEL_NONE  = 0
Unrestricted.
LEVEL_OFF  = 0
LEVEL_TABLEFLIP  = self::LEVEL_HIGH
LEVEL_VERY_HIGH  = 4
Must have a verified phone number.
MFA_ELEVATED  = 1
Guild has a 2FA requirement for moderation actions.
MFA_NONE  = 0
Guild has no MFA/2FA requirement for moderation actions.
NOTIFICATION_ALL_MESSAGES  = 0
Members will receive notifications for all messages by default.
NOTIFICATION_ONLY_MENTIONS  = 1
Members will receive notifications only for messages that @mention them by default.
NSFW_AGE_RESTRICTED  = 3
NSFW_DEFAULT  = 0
NSFW_EXPLICIT  = 1
NSFW_SAFE  = 2
PREMIUM_NONE  = 0
Guild has not unlocked any Server Boost perks.
PREMIUM_TIER_1  = 1
Guild has unlocked Server Boost level 1 perks.
PREMIUM_TIER_2  = 2
Guild has unlocked Server Boost level 2 perks.
PREMIUM_TIER_3  = 3
Guild has unlocked Server Boost level 3 perks.
REGION_DEFAULT  = 'us_west'
SUPPRESS_GUILD_REMINDER_NOTIFICATIONS  = 1 << 2
Suppress server setup tips.
SUPPRESS_JOIN_NOTIFICATION_REPLIES  = 1 << 3
Hide member join sticker reply buttons.
SUPPRESS_JOIN_NOTIFICATIONS  = 1 << 0
Suppress member join notifications.
SUPPRESS_PREMIUM_SUBSCRIPTION  = 1 << 1
Suppress server boost notifications.
SUPPRESS_ROLE_SUBSCRIPTION_PURCHASE_NOTIFICATION_REPLIES  = 1 << 5
Hide role subscription sticker reply buttons.
SUPPRESS_ROLE_SUBSCRIPTION_PURCHASE_NOTIFICATIONS  = 1 << 4
Suppress role subscription purchase and renewal notifications.
SUPPRESS_UGC_ADDED_NOTIFICATIONS  = 1 << 8
Suppress emoji added notifications.

Properties

$afk_channel_id  : string
$afk_timeout  : int
$approximate_member_count  : int|null
$approximate_presence_count  : int|null
$audit_log  : AuditLogRepository
$auto_moderation_rules  : AutoModerationRuleRepository
$bans  : BanRepository
$channels  : array<string|int, Channel>
$command_permissions  : CommandPermissionsRepository
$commands  : GuildCommandRepository
$created  : bool
Is the part already created in the Discord servers?
$default_message_notifications  : int
$emojis  : EmojiRepository
$explicit_content_filter  : int
$feature_animated_banner  : bool
$feature_animated_icon  : bool
$feature_application_command_permissions_v2  : bool
$feature_auto_moderation  : bool
$feature_banner  : bool
$feature_community  : bool
$feature_creator_monetizable_provisional  : bool
$feature_creator_store_page  : bool
$feature_developer_support_server  : bool
$feature_discoverable  : bool
$feature_enhanced_role_colors  : bool
$feature_featurable  : bool
$feature_guests_enabled  : bool
$feature_guild_tags  : bool
$feature_invite_splash  : bool
$feature_invites_disabled  : bool
$feature_member_verification_gate_enabled  : bool
$feature_monetization_enabled  : bool
$feature_more_soundboard  : bool
$feature_more_stickers  : bool
$feature_news  : bool
$feature_partnered  : bool
$feature_preview_enabled  : bool
$feature_raid_alerts_disabled  : bool
$feature_role_icons  : bool
$feature_role_subscriptions_available_for_purchase  : bool
$feature_role_subscriptions_enabled  : bool
$feature_soundboard  : bool
$feature_ticketed_events_enabled  : bool
$feature_vanity_url  : bool
$feature_verified  : bool
$feature_vip_regions  : bool
$feature_welcome_screen_enabled  : bool
$features  : array<string|int, string>
$guild_scheduled_events  : array<string|int, ScheduledEvent>
$id  : string
$integrations  : IntegrationRepository
$invites  : InviteRepository
$joined_at  : string
$large  : bool
$max_members  : int|null
$max_presences  : int|null
$max_stage_video_channel_users  : int|null
$max_video_channel_users  : int|null
$member_count  : int
$members  : array<string|int, Member>
$messages  : MessageRepository
$mfa_level  : int
$name  : string
$nsfw_level  : int
$owner  : User|null
$owner_id  : string
$preferred_locale  : string
$premium_progress_bar_enabled  : bool
$premium_subscription_count  : int|null
$premium_tier  : int
$presences  : array<string|int, PresenceUpdate>
$roles  : RoleRepository
$scriptData  : mixed
Custom script data.
$soundboard_sounds  : array<string|int, Sound>
$sounds  : SoundRepository
$stage_instances  : array<string|int, StageInstance>
$stickers  : StickerRepository
$system_channel_flags  : int
$templates  : GuildTemplateRepository
$threads  : array<string|int, Thread>
$unavailable  : bool|null
$verification_level  : int
$voice_states  : array<string|int, VoiceStateUpdate>
$welcome_screen  : WelcomeScreen|null
$widget_enabled  : bool|null
$attributes  : array<string|int, mixed>
The parts attributes.
$discord  : Discord
The Discord client.
$factory  : Factory
The factory.
$fillable  : array<string|int, mixed>
The parts fillable attributes.
$hidden  : array<string|int, mixed>
Attributes that are hidden from debug info.
$http  : Http
The HTTP client.
$repositories  : array<string|int, mixed>
An array of repositories that can exist in a part.
$repositories_cache  : array<string|int, mixed>
An array of repositories.
$visible  : array<string|int, mixed>
Attributes which are visible from debug info.

Methods

__construct()  : mixed
Create a new part instance.
__debugInfo()  : array<string|int, mixed>
__get()  : mixed
Handles dynamic get calls onto the part.
__serialize()  : array<string|int, mixed>
__set()  : void
Handles dynamic set calls onto the part.
__toString()  : string
Converts the part to a string.
__unserialize()  : void
beginPrune()  : PromiseInterface<string|int, int|null>
Begin a prune members operation.
createChannel()  : PromiseInterface<string|int, Channel>
Attempts to save a channel to the Discord servers.
createdTimestamp()  : float|null
Returns the timestamp of when the guild was created.
createEmoji()  : PromiseInterface<string|int, Emoji>
Creates an Emoji for the guild.
createInvite()  : PromiseInterface<string|int, Invite>
Attempts to create an Invite to a channel in this guild where possible.
createRole()  : PromiseInterface<string|int, Role>
Creates a role.
createSticker()  : PromiseInterface<string|int, Sticker>
Creates a Sticker for the guild.
fetch()  : PromiseInterface<string|int, static>
Fetches any missing information about the part from Discord's servers.
fill()  : void
Fills the parts attributes from an array.
getAuditLog()  : PromiseInterface<string|int, AuditLog>
Returns an audit log object for the query.
getBotPermissions()  : RolePermission|null
Returns the bot's permissions in the guild.
getConstants()  : array<string|int, mixed>
Returns an array of constant names and their values.
getCreatableAttributes()  : array<string|int, mixed>
getCurrentUserVoiceState()  : PromiseInterface<string|int, VoiceStateUpdate>
Returns the current user's voice state in the guild.
getDiscord()  : Discord
Get the Discord instance that owns this Part.
getIconAttribute()  : string|null
Returns the guilds icon.
getInvites()  : PromiseInterface<string|int, ExCollectionInterface<string|int, Invite>|array<string|int, Invite>>
Returns the channels invites.
getPruneCount()  : PromiseInterface<string|int, int>
Returns the number of members that would be removed in a prune operation.
getPublicAttributes()  : array<string|int, mixed>
Returns an array of public attributes.
getRawAttributes()  : array<string|int, mixed>
Returns an array of raw attributes.
getRepositoryAttributes()  : array<string|int, mixed>
getSplashAttribute()  : string|null
Returns the guild splash.
getUpdatableAttributes()  : array<string|int, mixed>
getUserVoiceState()  : PromiseInterface<string|int, VoiceStateUpdate>
Returns the specified user's voice state in the guild.
getVoiceRegions()  : PromiseInterface<string|int, Collection>
Gets the voice regions available.
getWelcomeScreen()  : PromiseInterface<string|int, WelcomeScreen>
Get the Welcome Screen for the guild.
getWidget()  : PromiseInterface<string|int, Widget>
Get the Widget for the guild.
getWidgetSettings()  : PromiseInterface<string|int, object>
Fetch the Widget Settings for the guild.
isPartial()  : bool
Whether the part is considered partial i.e. missing information which can be fetched from Discord.
jsonSerialize()  : array<string|int, mixed>
Provides data when the part is encoded into JSON. Used for JsonSerializable.
leave()  : PromiseInterface
Leaves the guild.
modifyCurrentMember()  : PromiseInterface<string|int, self>
Modifies the current member (no validation).
modifyCurrentUserVoiceState()  : PromiseInterface
Modify the current user's voice state in the guild.
modifyUserVoiceState()  : PromiseInterface
Updates another user's voice state.
offsetExists()  : bool
Checks if an attribute exists via key. Used for ArrayAccess.
offsetGet()  : mixed
Gets an attribute via key. Used for ArrayAccess.
offsetSet()  : void
Sets an attribute via key. Used for ArrayAccess.
offsetUnset()  : void
Unsets an attribute via key. Used for ArrayAccess.
save()  : PromiseInterface
searchMembers()  : PromiseInterface<string|int, ExCollectionInterface<string|int, Member>|array<string|int, Member>>
Returns a list of guild member objects whose username or nickname starts with a provided string.
serialize()  : string|null
Serializes the data. Used for Serializable.
setFeatures()  : PromiseInterface<string|int, self>
Modify the guild feature.
transferOwnership()  : PromiseInterface<string|int, self>
Transfers ownership of the guild to another member.
unban()  : PromiseInterface
Unbans a member. Alias for `$guild->bans->unban($user)`.
unserialize()  : void
Unserializes some data and stores it. Used for Serializable.
updateMFALevel()  : PromiseInterface<string|int, self>
Modify the Guild `mfa_level`, requires guild ownership.
updateRolePositions()  : PromiseInterface<string|int, self>
Updates the positions of a list of given roles.
updateWelcomeScreen()  : PromiseInterface<string|int, WelcomeScreen>
Modify the guild's Welcome Screen. Requires the MANAGE_GUILD permission.
updateWidgetSettings()  : PromiseInterface
Modify a guild widget settings object for the guild. All attributes may be passed in with JSON and modified. Requires the MANAGE_GUILD permission.
validateRegion()  : PromiseInterface
Validates the specified region.
afterConstruct()  : void
Called after the part has been constructed.
attributeCarbonHelper()  : Carbon|null
Helps with getting ISO8601 timestamp attributes.
attributeCollectionHelper()  : ExCollectionInterface
Helps with getting Part attributes.
attributePartHelper()  : Part|null
Helps with getting Part attributes.
attributeTypedCollectionHelper()  : ExCollectionInterface
Helps with getting Part attributes for classes with extended types.
checkForGetMutator()  : string|false
Checks if there is a get mutator present.
checkForSetMutator()  : string|false
Checks if there is a set mutator present.
getAttribute()  : mixed
Gets an attribute on the part.
getFeatureAnimatedBannerAttribute()  : bool
getFeatureAnimatedIconAttribute()  : bool
getFeatureApplicationCommandPermissionsV2Attribute()  : bool
getFeatureAutoModerationAttribute()  : bool
getFeatureBannerAttribute()  : bool
getFeatureCommunityAttribute()  : bool
getFeatureCreatorMonetizableProvisionalAttribute()  : bool
getFeatureCreatorStorePageAttribute()  : bool
getFeatureDeveloperSupportServerAttribute()  : bool
getFeatureDiscoverableAttribute()  : bool
getFeatureEnhancedRoleColorsAttribute()  : bool
getFeatureFeaturableAttribute()  : bool
getFeatureGuestsEnabledAttribute()  : bool
getFeatureGuildTagsAttribute()  : bool
getFeatureHasDirectoryEntryAttribute()  : bool
getFeatureInvitesDisabledAttribute()  : bool
getFeatureInviteSplashAttribute()  : bool
getFeatureLinkedToHubAttribute()  : bool
getFeatureMemberVerificationGateEnabledAttribute()  : bool
getFeatureMonetizationEnabledAttribute()  : bool
getFeatureMoreSoundboardAttribute()  : bool
getFeatureMoreStickersAttribute()  : bool
getFeatureNewsAttribute()  : bool
getFeaturePartneredAttribute()  : bool
getFeaturePreviewEnabledAttribute()  : bool
getFeaturePrivateThreadsAttribute()  : bool
getFeatureRaidAlertsDisabledAttribute()  : bool
getFeatureRaidAlertsEnabledAttribute()  : bool
getFeatureRoleIconsAttribute()  : bool
getFeatureRoleSubscriptionsAvailableForPurchaseAttribute()  : bool
getFeatureRoleSubscriptionsEnabledAttribute()  : bool
getFeatureSoundboardAttribute()  : bool
getFeatureTicketedEventsEnabledAttribute()  : bool
getFeatureVanityUrlAttribute()  : bool
getFeatureVerifiedAttribute()  : bool
getFeatureVipRegionsAttribute()  : bool
getFeatureWelcomeScreenEnabledAttribute()  : bool
getIconHashAttribute()  : string|null
Returns the guild icon hash.
getIncidentsDataAttribute()  : IncidentsData|null
Returns the incidents data attribute.
getJoinedAtAttribute()  : Carbon|null
Returns the joined_at attribute.
getOwnerAttribute()  : User|null
Returns the owner.
getSplashHashAttribute()  : string|null
Returns the guild splash hash.
getStageInstancesAttribute()  : ExCollectionInterface<string|int, StageInstance>|array<string|int, StageInstance>
Returns the channels stage instances.
getWelcomeScreenAttribute()  : WelcomeScreen|null
Returns the Welcome Screen object for the guild.
makeOptionalAttributes()  : array<string|int, mixed>
Return key-value attributes if it has been filled.
setAttribute()  : void
Sets an attribute on the part.
setChannelsAttribute()  : void
setEmojisAttribute()  : void
Sets the emojis attribute.
setRolesAttribute()  : void
Sets the roles attribute.
setStickersAttribute()  : void
Sets the stickers attribute.
studly()  : string
Converts a string to studlyCase.

Constants

EXPLICIT_CONTENT_FILTER_ALL_MEMBERS

Media content sent by all members will be scanned.

public mixed EXPLICIT_CONTENT_FILTER_ALL_MEMBERS = 2

EXPLICIT_CONTENT_FILTER_DISABLED

Media content will not be scanned.

public mixed EXPLICIT_CONTENT_FILTER_DISABLED = 0

EXPLICIT_CONTENT_FILTER_MEMBERS_WITHOUT_ROLES

Media content sent by members without roles will be scanned.

public mixed EXPLICIT_CONTENT_FILTER_MEMBERS_WITHOUT_ROLES = 1

HUB_TYPE_COLLEGE

public mixed HUB_TYPE_COLLEGE = 2

HUB_TYPE_DEFAULT

public mixed HUB_TYPE_DEFAULT = 0

HUB_TYPE_HIGH_SCHOOL

public mixed HUB_TYPE_HIGH_SCHOOL = 1

LEVEL_DOUBLE_TABLEFLIP

use GUILD::LEVEL_VERY_HIGH

public mixed LEVEL_DOUBLE_TABLEFLIP = self::LEVEL_VERY_HIGH

LEVEL_HIGH

Must be a member of the server for longer than 10 minutes.

public mixed LEVEL_HIGH = 3

LEVEL_LOW

Must have verified email on account.

public mixed LEVEL_LOW = 1

LEVEL_MEDIUM

Must be registered on Discord for longer than 5 minutes.

public mixed LEVEL_MEDIUM = 2

LEVEL_NONE

Unrestricted.

public mixed LEVEL_NONE = 0

LEVEL_OFF

use GUILD::LEVEL_NONE

public mixed LEVEL_OFF = 0

LEVEL_TABLEFLIP

use GUILD::LEVEL_HIGH

public mixed LEVEL_TABLEFLIP = self::LEVEL_HIGH

LEVEL_VERY_HIGH

Must have a verified phone number.

public mixed LEVEL_VERY_HIGH = 4

MFA_ELEVATED

Guild has a 2FA requirement for moderation actions.

public mixed MFA_ELEVATED = 1

MFA_NONE

Guild has no MFA/2FA requirement for moderation actions.

public mixed MFA_NONE = 0

NOTIFICATION_ALL_MESSAGES

Members will receive notifications for all messages by default.

public mixed NOTIFICATION_ALL_MESSAGES = 0

NOTIFICATION_ONLY_MENTIONS

Members will receive notifications only for messages that @mention them by default.

public mixed NOTIFICATION_ONLY_MENTIONS = 1

NSFW_AGE_RESTRICTED

public mixed NSFW_AGE_RESTRICTED = 3

NSFW_DEFAULT

public mixed NSFW_DEFAULT = 0

NSFW_EXPLICIT

public mixed NSFW_EXPLICIT = 1

NSFW_SAFE

public mixed NSFW_SAFE = 2

PREMIUM_NONE

Guild has not unlocked any Server Boost perks.

public mixed PREMIUM_NONE = 0

PREMIUM_TIER_1

Guild has unlocked Server Boost level 1 perks.

public mixed PREMIUM_TIER_1 = 1

PREMIUM_TIER_2

Guild has unlocked Server Boost level 2 perks.

public mixed PREMIUM_TIER_2 = 2

PREMIUM_TIER_3

Guild has unlocked Server Boost level 3 perks.

public mixed PREMIUM_TIER_3 = 3

REGION_DEFAULT

public mixed REGION_DEFAULT = 'us_west'

SUPPRESS_GUILD_REMINDER_NOTIFICATIONS

Suppress server setup tips.

public mixed SUPPRESS_GUILD_REMINDER_NOTIFICATIONS = 1 << 2

SUPPRESS_JOIN_NOTIFICATION_REPLIES

Hide member join sticker reply buttons.

public mixed SUPPRESS_JOIN_NOTIFICATION_REPLIES = 1 << 3

SUPPRESS_JOIN_NOTIFICATIONS

Suppress member join notifications.

public mixed SUPPRESS_JOIN_NOTIFICATIONS = 1 << 0

SUPPRESS_PREMIUM_SUBSCRIPTION

Suppress server boost notifications.

public mixed SUPPRESS_PREMIUM_SUBSCRIPTION = 1 << 1

SUPPRESS_ROLE_SUBSCRIPTION_PURCHASE_NOTIFICATION_REPLIES

Hide role subscription sticker reply buttons.

public mixed SUPPRESS_ROLE_SUBSCRIPTION_PURCHASE_NOTIFICATION_REPLIES = 1 << 5

SUPPRESS_ROLE_SUBSCRIPTION_PURCHASE_NOTIFICATIONS

Suppress role subscription purchase and renewal notifications.

public mixed SUPPRESS_ROLE_SUBSCRIPTION_PURCHASE_NOTIFICATIONS = 1 << 4

SUPPRESS_UGC_ADDED_NOTIFICATIONS

Suppress emoji added notifications.

public mixed SUPPRESS_UGC_ADDED_NOTIFICATIONS = 1 << 8

Properties

$afk_channel_id

public string $afk_channel_id

The unique identifier of the AFK channel ID.

$afk_timeout

public int $afk_timeout

How long in seconds you will remain in the voice channel until you are moved into the AFK channel. Can be set to: 60, 300, 900, 1800, 3600.

$approximate_member_count

public int|null $approximate_member_count

Approximate number of members in this guild, returned from the GET /guilds/ endpoint when with_counts is true.

$approximate_presence_count

public int|null $approximate_presence_count

Approximate number of non-offline members in this guild, returned from the GET /guilds/ endpoint when with_counts is true.

$created

Is the part already created in the Discord servers?

public bool $created = false

Whether the part has been created.

$default_message_notifications

public int $default_message_notifications

Default notification level.

$explicit_content_filter

public int $explicit_content_filter

Explicit content filter level.

$feature_animated_banner read-only

public bool $feature_animated_banner

Guild has access to set an animated guild banner image.

$feature_animated_icon read-only

public bool $feature_animated_icon

Guild has access to set an animated guild icon.

$feature_application_command_permissions_v2 read-only

public bool $feature_application_command_permissions_v2

Guild is using the old permissions configuration behavior.

$feature_auto_moderation read-only

public bool $feature_auto_moderation

Guild has set up auto moderation rules.

$feature_banner read-only

public bool $feature_banner

Guild has access to set a guild banner image.

$feature_community read-only

public bool $feature_community

Guild can enable welcome screen, Membership Screening, stage channels and discovery, and receives community updates.

$feature_creator_monetizable_provisional read-only

public bool $feature_creator_monetizable_provisional

Guild has enabled monetization.

$feature_creator_store_page read-only

public bool $feature_creator_store_page

Guild has enabled the role subscription promo page.

$feature_developer_support_server read-only

public bool $feature_developer_support_server

Guild has been set as a support server on the App Directory.

$feature_discoverable read-only

public bool $feature_discoverable

Guild is able to be discovered in the directory.

$feature_enhanced_role_colors read-only

public bool $feature_enhanced_role_colors

Guild is able to set gradient colors to roles.

$feature_featurable read-only

public bool $feature_featurable

Guild is able to be featured in the directory.

$feature_guests_enabled read-only

public bool $feature_guests_enabled

Guild has access to guest invites.

$feature_guild_tags read-only

public bool $feature_guild_tags

Guild access to set guild tags.

$feature_invite_splash read-only

public bool $feature_invite_splash

Guild has access to set an invite splash background.

$feature_invites_disabled read-only

public bool $feature_invites_disabled

Guild has paused invites, preventing new users from joining.

$feature_member_verification_gate_enabled read-only

public bool $feature_member_verification_gate_enabled

Guild has enabled membership screening.

$feature_monetization_enabled read-only

public bool $feature_monetization_enabled

Guild has enabled monetization.

$feature_more_soundboard read-only

public bool $feature_more_soundboard

Guild has increased custom soundboard sound slots.

$feature_more_stickers read-only

public bool $feature_more_stickers

Guild has increased custom sticker slots.

$feature_news read-only

public bool $feature_news

Guild has access to create announcement channels.

$feature_partnered read-only

public bool $feature_partnered

Guild is partnered.

$feature_preview_enabled read-only

public bool $feature_preview_enabled

Guild can be previewed before joining via membership screening or the directory.

$feature_raid_alerts_disabled read-only

public bool $feature_raid_alerts_disabled

Guild has disabled alerts for join raids in the configured safety alerts channel.

$feature_role_icons read-only

public bool $feature_role_icons

Guild is able to set role icons.

$feature_role_subscriptions_available_for_purchase read-only

public bool $feature_role_subscriptions_available_for_purchase

Guild has role subscriptions that can be purchased.

$feature_role_subscriptions_enabled read-only

public bool $feature_role_subscriptions_enabled

Guild has enabled role subscriptions.

$feature_soundboard read-only

public bool $feature_soundboard

Guild has created soundboard sounds.

$feature_ticketed_events_enabled read-only

public bool $feature_ticketed_events_enabled

Guild has enabled ticketed events.

$feature_vanity_url read-only

public bool $feature_vanity_url

Guild has access to set a vanity url.

$feature_verified read-only

public bool $feature_verified

Guild is verified.

$feature_vip_regions read-only

public bool $feature_vip_regions

Guild has access to set 384kbps bitrate in voice.

$feature_welcome_screen_enabled read-only

public bool $feature_welcome_screen_enabled

Guild has enabled the welcome screen.

$features

public array<string|int, string> $features

An array of features that the guild has.

$id

public string $id

The unique identifier of the guild.

$joined_at

public string $joined_at

ISO8601 timestamp when this guild was joined.

$max_members

public int|null $max_members

Maximum amount of members allowed in the guild.

$max_presences

public int|null $max_presences

Maximum amount of presences allowed in the guild.

$max_stage_video_channel_users

public int|null $max_stage_video_channel_users

Maximum amount of users in a stage video channel.

$max_video_channel_users

public int|null $max_video_channel_users

Maximum amount of users allowed in a video channel.

$member_count

public int $member_count

Total number of members in this guild.

$mfa_level

public int $mfa_level

MFA level required to join.

$name

public string $name

The name of the guild.

$nsfw_level

public int $nsfw_level

The guild NSFW level.

$owner read-only

public User|null $owner

The owner of the guild.

$owner_id

public string $owner_id

The unique identifier of the owner of the guild.

$preferred_locale

public string $preferred_locale

Preferred locale of the guild.

$premium_progress_bar_enabled

public bool $premium_progress_bar_enabled

Whether the guild has the boost progress bar enabled.

$premium_subscription_count

public int|null $premium_subscription_count

Number of boosts in the guild.

$premium_tier

public int $premium_tier

Server boost level.

$presences

public array<string|int, PresenceUpdate> $presences

Presences of the members in the guild (will only include non-offline members if size > large threshold).

$scriptData

Custom script data.

Relying on this variable with dynamic caching is discouraged.

public mixed $scriptData

Used for storing custom information, used by end products.

$soundboard_sounds

public array<string|int, Sound> $soundboard_sounds

Array of soundboard sound objects.

$system_channel_flags

public int $system_channel_flags

Flags for the system channel.

$threads

public array<string|int, Thread> $threads

All active threads in the guild that current user has permission to view.

$unavailable

public bool|null $unavailable

True if this guild is unavailable due to an outage.

$verification_level

public int $verification_level

The verification level used for the guild.

$voice_states

public array<string|int, VoiceStateUpdate> $voice_states

States of members currently in voice channels (partial voice state objects; lacks guild_id).

$welcome_screen read-only

public WelcomeScreen|null $welcome_screen

The welcome screen of a Community guild, shown to new members, returned in an Invite's guild object. use getWelcomeScreen first to populate.

$widget_enabled

public bool|null $widget_enabled

Is server widget enabled.

$attributes

The parts attributes.

protected array<string|int, mixed> $attributes = []

The parts attributes and content.

$discord

The Discord client.

protected Discord $discord

Client.

$fillable

The parts fillable attributes.

protected array<string|int, mixed> $fillable = [ 'id', 'name', 'icon', 'icon_hash', 'description', 'splash', 'discovery_splash', 'features', 'banner', 'owner_id', 'application_id', 'afk_channel_id', 'afk_timeout', 'system_channel_id', 'widget_enabled', 'widget_channel_id', 'verification_level', 'default_message_notifications', 'hub_type', 'mfa_level', 'explicit_content_filter', 'max_presences', 'max_members', 'vanity_url_code', 'premium_tier', 'premium_subscription_count', 'system_channel_flags', 'preferred_locale', 'rules_channel_id', 'public_updates_channel_id', 'max_video_channel_users', 'max_stage_video_channel_users', 'approximate_member_count', 'approximate_presence_count', 'welcome_screen', 'nsfw_level', 'premium_progress_bar_enabled', 'safety_alerts_channel_id', 'incidents_data', // events 'joined_at', 'large', 'member_count', // repositories 'channels', 'roles', 'emojis', 'stickers', 'voice_states', ]

The array of attributes that can be mass-assigned.

Tags
inheritDoc

$hidden

Attributes that are hidden from debug info.

protected array<string|int, mixed> $hidden = []

Attributes that are hidden from public.

$http

The HTTP client.

protected Http $http

Client.

$repositories

An array of repositories that can exist in a part.

protected array<string|int, mixed> $repositories = ['roles' => \Discord\Repository\Guild\RoleRepository::class, 'emojis' => \Discord\Repository\Guild\EmojiRepository::class, 'stickers' => \Discord\Repository\Guild\StickerRepository::class, 'members' => \Discord\Repository\Guild\MemberRepository::class, 'channels' => \Discord\Repository\Guild\ChannelRepository::class, 'guild_scheduled_events' => \Discord\Repository\Guild\ScheduledEventRepository::class, 'audit_log' => \Discord\Repository\Guild\AuditLogRepository::class, 'auto_moderation_rules' => \Discord\Repository\Guild\AutoModerationRuleRepository::class, 'bans' => \Discord\Repository\Guild\BanRepository::class, 'commands' => \Discord\Repository\Guild\GuildCommandRepository::class, 'command_permissions' => \Discord\Repository\Guild\CommandPermissionsRepository::class, 'integrations' => \Discord\Repository\Guild\IntegrationRepository::class, 'invites' => \Discord\Repository\Guild\InviteRepository::class, 'messages' => \Discord\Repository\Guild\MessageRepository::class, 'sounds' => \Discord\Repository\Guild\SoundRepository::class, 'templates' => \Discord\Repository\Guild\GuildTemplateRepository::class, 'voice_states' => \Discord\Repository\VoiceStateRepository::class]

Repositories.

Tags
inheritDoc

$repositories_cache

An array of repositories.

protected array<string|int, mixed> $repositories_cache = []

$visible

Attributes which are visible from debug info.

protected array<string|int, mixed> $visible = ['feature_animated_banner', 'feature_animated_icon', 'feature_application_command_permissions_v2', 'feature_auto_moderation', 'feature_banner', 'feature_community', 'feature_creator_monetizable_provisional', 'feature_creator_store_page', 'feature_developer_support_server', 'feature_discoverable', 'feature_featurable', 'feature_invites_disabled', 'feature_invite_splash', 'feature_member_verification_gate_enabled', 'feature_more_soundboard', 'feature_more_stickers', 'feature_news', 'feature_partnered', 'feature_preview_enabled', 'feature_raid_alerts_disabled', 'feature_role_icons', 'feature_role_subscriptions_available_for_purchase', 'feature_role_subscriptions_enabled', 'feature_soundboard', 'feature_ticketed_events_enabled', 'feature_vanity_url', 'feature_verified', 'feature_vip_regions', 'feature_welcome_screen_enabled', 'feature_guests_enabled', 'feature_guild_tags', 'feature_enhanced_role_colors']
Tags
inheritDoc

Methods

__construct()

Create a new part instance.

public __construct(Discord $discord[, array<string|int, mixed> $attributes = [] ][, bool $created = false ]) : mixed
Parameters
$discord : Discord

The Discord client.

$attributes : array<string|int, mixed> = []

An array of attributes to build the part.

$created : bool = false

Whether the part has already been created.

__debugInfo()

public __debugInfo() : array<string|int, mixed>
Return values
array<string|int, mixed>

__get()

Handles dynamic get calls onto the part.

public __get(string $key) : mixed
Parameters
$key : string

The attributes key.

Tags
throws
Exception
see
Part::getAttribute()

This function forwards onto getAttribute.

Return values
mixed

The value of the attribute.

__serialize()

public __serialize() : array<string|int, mixed>
Return values
array<string|int, mixed>

__set()

Handles dynamic set calls onto the part.

public __set(string $key, mixed $value) : void
Parameters
$key : string

The attributes key.

$value : mixed

The attributes value.

Tags
see
self::setAttribute()

This function forwards onto setAttribute.

__toString()

Converts the part to a string.

public __toString() : string
Tags
throws
Exception
see
Part::getPublicAttributes()

This function encodes getPublicAttributes into JSON.

Return values
string

A JSON string of attributes.

__unserialize()

public __unserialize(array<string|int, mixed> $data) : void
Parameters
$data : array<string|int, mixed>

beginPrune()

Begin a prune members operation.

public beginPrune([array<string|int, string>|array<string|int, Role>|null $options = [] ][, string $reason = null ]) : PromiseInterface<string|int, int|null>

For large guilds it's recommended to set the compute_prune_count option to false, forcing 'pruned' to null.

Parameters
$options : array<string|int, string>|array<string|int, Role>|null = []

['include_roles'] Roles to include, defaults to none.

$reason : string = null

Reason for Audit Log.

Tags
link
https://discord.com/developers/docs/resources/guild#begin-guild-prune
throws
NoPermissionsException

Missing kick_members permission.

Return values
PromiseInterface<string|int, int|null>

The number of members that were removed in the prune operation.

createChannel()

Attempts to save a channel to the Discord servers.

public createChannel(Channel|ChannelBuilder|string $channel[, string|null $reason = null ]) : PromiseInterface<string|int, Channel>
Parameters
$channel : Channel|ChannelBuilder|string

The Channel builder that should be converted into a channel, or the name of the channel.

$reason : string|null = null

Reason for Audit Log.

Tags
link
https://discord.com/developers/docs/resources/guild#create-guild-channel
since
10.25.2
Return values
PromiseInterface<string|int, Channel>

createdTimestamp()

Returns the timestamp of when the guild was created.

public createdTimestamp() : float|null
Return values
float|null

createEmoji()

Creates an Emoji for the guild.

public createEmoji(array<string|int, mixed>|null $options[, string|null $filepath = null ][, string|null $reason = null ]) : PromiseInterface<string|int, Emoji>
Parameters
$options : array<string|int, mixed>|null

['roles'] Roles allowed to use this emoji.

$filepath : string|null = null

The path to the file if specified will override image data string.

$reason : string|null = null

Reason for Audit Log.

Tags
link
https://discord.com/developers/docs/resources/emoji#create-guild-emoji
throws
NoPermissionsException

Missing manage_guild_expressions permission.

throws
FileNotFoundException

File does not exist.

Return values
PromiseInterface<string|int, Emoji>

createInvite()

Attempts to create an Invite to a channel in this guild where possible.

public createInvite(mixed ...$args) : PromiseInterface<string|int, Invite>
Parameters
$args : mixed
Tags
see
Channel::createInvite()
throws
RuntimeException

No possible channels to create Invite on.

throws
NoPermissionsException
Return values
PromiseInterface<string|int, Invite>

createRole()

Creates a role.

public createRole([array<string|int, mixed> $data = [] ][, string|null $reason = null ]) : PromiseInterface<string|int, Role>
Parameters
$data : array<string|int, mixed> = []

The data to fill the role with.

$reason : string|null = null

Reason for Audit Log.

Tags
link
https://discord.com/developers/docs/resources/guild#create-guild-role
throws
NoPermissionsException

Missing manage_roles permission.

Return values
PromiseInterface<string|int, Role>

createSticker()

Creates a Sticker for the guild.

public createSticker(string $options, string $filepath[, string|null $reason = null ]) : PromiseInterface<string|int, Sticker>
Parameters
$options : string

['tags'] Autocomplete/suggestion tags for the sticker (max 200 characters).

$filepath : string

The sticker file to upload, must be a PNG, APNG, or Lottie JSON file, max 512 KB.

$reason : string|null = null

Reason for Audit Log.

Tags
link
https://discord.com/developers/docs/resources/sticker#create-guild-sticker
throws
NoPermissionsException

Missing manage_guild_expressions permission.

throws
FileNotFoundException

The file does not exist.

throws
LengthException

Description is not 2-100 characters long.

throws
DomainException

File format is not PNG, APNG, or Lottie JSON.

throws
RuntimeException

Guild is not verified or partnered to upload Lottie stickers.

Return values
PromiseInterface<string|int, Sticker>

fetch()

Fetches any missing information about the part from Discord's servers.

public fetch() : PromiseInterface<string|int, static>
Tags
throws
RuntimeException

The part is not fetchable.

Return values
PromiseInterface<string|int, static>

fill()

Fills the parts attributes from an array.

public fill(array<string|int, mixed> $attributes) : void
Parameters
$attributes : array<string|int, mixed>

An array of attributes to build the part.

Tags
see
self::setAttribute()

getConstants()

Returns an array of constant names and their values.

public getConstants() : array<string|int, mixed>
Tags
since
10.19.0
Return values
array<string|int, mixed>

An associative array where keys are constant names and values are their values.

getIconAttribute()

Returns the guilds icon.

public getIconAttribute([string|null $format = null ][, int $size = 1024 ]) : string|null
Parameters
$format : string|null = null

The image format.

$size : int = 1024

The size of the image.

Return values
string|null

The URL to the guild icon or null.

getPruneCount()

Returns the number of members that would be removed in a prune operation.

public getPruneCount([array<string|int, string>|array<string|int, Role>|null $options = [] ]) : PromiseInterface<string|int, int>
Parameters
$options : array<string|int, string>|array<string|int, Role>|null = []

['include_roles'] Roles to include, defaults to none.

Tags
link
https://discord.com/developers/docs/resources/guild#get-guild-prune-count
throws
NoPermissionsException

Missing kick_members permission.

Return values
PromiseInterface<string|int, int>

The number of members that would be removed.

getPublicAttributes()

Returns an array of public attributes.

public getPublicAttributes() : array<string|int, mixed>
Tags
throws
Exception
Return values
array<string|int, mixed>

An array of public attributes.

getRawAttributes()

Returns an array of raw attributes.

public getRawAttributes() : array<string|int, mixed>
Return values
array<string|int, mixed>

Raw attributes.

getRepositoryAttributes()

public getRepositoryAttributes() : array<string|int, mixed>
Tags
inheritDoc
Return values
array<string|int, mixed>

getSplashAttribute()

Returns the guild splash.

public getSplashAttribute([string $format = 'webp' ][, int $size = 2048 ]) : string|null
Parameters
$format : string = 'webp'

The image format.

$size : int = 2048

The size of the image.

Return values
string|null

The URL to the guild splash or null.

isPartial()

Whether the part is considered partial i.e. missing information which can be fetched from Discord.

public isPartial() : bool
Return values
bool

jsonSerialize()

Provides data when the part is encoded into JSON. Used for JsonSerializable.

public jsonSerialize() : array<string|int, mixed>
Tags
throws
Exception
see
Part::getPublicAttributes()

This function forwards onto getPublicAttributes.

Return values
array<string|int, mixed>

An array of public attributes.

leave()

Leaves the guild.

public leave() : PromiseInterface
Return values
PromiseInterface

modifyCurrentMember()

Modifies the current member (no validation).

public modifyCurrentMember(array<string|int, mixed> $params[, string|null $reason = null ]) : PromiseInterface<string|int, self>
Parameters
$params : array<string|int, mixed>

The parameters to modify.

$reason : string|null = null

Reason for Audit Log.

Tags
link
https://discord.com/developers/docs/resources/guild#modify-current-member-json-params
since
10.30.0
Return values
PromiseInterface<string|int, self>

modifyCurrentUserVoiceState()

Modify the current user's voice state in the guild.

public modifyCurrentUserVoiceState(array<string|int, mixed> $data) : PromiseInterface

Caveats:

  • channel_id must currently point to a stage channel.
  • Current user must already have joined channel_id.
  • You must have the MUTE_MEMBERS permission to unsuppress yourself. You can always suppress yourself.
  • You must have the REQUEST_TO_SPEAK permission to request to speak. You can always clear your own request to speak.
  • You are able to set request_to_speak_timestamp to any present or future time.
Parameters
$data : array<string|int, mixed>
Tags
link
https://discord.com/developers/docs/resources/guild#modify-current-user-voice-state
Return values
PromiseInterface

modifyUserVoiceState()

Updates another user's voice state.

public modifyUserVoiceState(mixed $user, array<string|int, mixed> $data) : PromiseInterface

Caveats:

  • channel_id must currently point to a stage channel.
  • User must already have joined channel_id.
  • You must have the MUTE_MEMBERS permission. (Since suppression is the only thing that is available currently.)
  • When unsuppressed, non-bot users will have their request_to_speak_timestamp set to the current time. Bot users will not.
  • When suppressed, the user will have their request_to_speak_timestamp removed.
Parameters
$user : mixed
$data : array<string|int, mixed>
Tags
link
https://discord.com/developers/docs/resources/voice#modify-user-voice-state
Return values
PromiseInterface

offsetExists()

Checks if an attribute exists via key. Used for ArrayAccess.

public offsetExists(string $key) : bool
Parameters
$key : string

The attribute key.

Return values
bool

Whether the offset exists.

offsetGet()

Gets an attribute via key. Used for ArrayAccess.

public offsetGet(string $key) : mixed
Parameters
$key : string

The attribute key.

Tags
throws
Exception
see
Part::getAttribute()

This function forwards onto getAttribute.

Attributes
#[ReturnTypeWillChange]

offsetSet()

Sets an attribute via key. Used for ArrayAccess.

public offsetSet(string $key, mixed $value) : void
Parameters
$key : string

The attribute key.

$value : mixed

The attribute value.

Tags
see
Part::setAttribute()

This function forwards onto setAttribute.

offsetUnset()

Unsets an attribute via key. Used for ArrayAccess.

public offsetUnset(string $key) : void
Parameters
$key : string

The attribute key.

save()

public save([string|null $reason = null ]) : PromiseInterface
Parameters
$reason : string|null = null
Tags
inheritDoc
Return values
PromiseInterface

searchMembers()

Returns a list of guild member objects whose username or nickname starts with a provided string.

public searchMembers(int|null $options) : PromiseInterface<string|int, ExCollectionInterface<string|int, Member>|array<string|int, Member>>
Parameters
$options : int|null

['limit'] How many entries are returned (default 1, minimum 1, maximum 1000)

Tags
link
https://discord.com/developers/docs/resources/guild#search-guild-members
Return values
PromiseInterface<string|int, ExCollectionInterface<string|int, Member>|array<string|int, Member>>

serialize()

Serializes the data. Used for Serializable.

public serialize() : string|null
Return values
string|null

A string of serialized data.

setFeatures()

Modify the guild feature.

public setFeatures(array<string|int, bool> $features[, string|null $reason = null ]) : PromiseInterface<string|int, self>
Parameters
$features : array<string|int, bool>

Array of features to set/unset, e.g. ['COMMUNITY' => true, 'INVITES_DISABLED' => false].

$reason : string|null = null

Reason for Audit Log.

Tags
link
https://discord.com/developers/docs/resources/guild#modify-guild
link
https://discord.com/developers/docs/resources/guild#guild-object-mutable-guild-features
throws
OutOfRangeException

Feature is not mutable.

throws
RuntimeException

Guild feature is already set.

throws
NoPermissionsException

Missing various permissions: administrator for COMMUNITY or DISCOVERABLE. manage_guild for INVITES_DISABLED or RAID_ALERTS_ENABLED.

Return values
PromiseInterface<string|int, self>

This guild.

transferOwnership()

Transfers ownership of the guild to another member.

public transferOwnership(Member|int $member[, string|null $reason = null ]) : PromiseInterface<string|int, self>
Parameters
$member : Member|int

The member to transfer ownership to.

$reason : string|null = null

Reason for Audit Log.

Tags
throws
RuntimeException

Ownership not transferred correctly.

Return values
PromiseInterface<string|int, self>

unban()

Unbans a member. Alias for `$guild->bans->unban($user)`.

public unban(User|string $user) : PromiseInterface
Parameters
$user : User|string
Tags
see
BanRepository::unban()
throws
NoPermissionsException

Missing ban_members permission.

Return values
PromiseInterface

unserialize()

Unserializes some data and stores it. Used for Serializable.

public unserialize(string $data) : void
Parameters
$data : string

Some serialized data.

Tags
see
Part::setAttribute()

The unserialized data is stored with setAttribute.

updateMFALevel()

Modify the Guild `mfa_level`, requires guild ownership.

public updateMFALevel(int $level[, string|null $reason = null ]) : PromiseInterface<string|int, self>
Parameters
$level : int

The new MFA level Guild::MFA_NONE or Guild::MFA_ELEVATED.

$reason : string|null = null

Reason for Audit Log.

Tags
link
https://discord.com/developers/docs/resources/guild#modify-guild-mfa-level
Return values
PromiseInterface<string|int, self>

This guild.

updateRolePositions()

Updates the positions of a list of given roles.

public updateRolePositions(ExCollectionInterface|array<string|int, mixed> $roles) : PromiseInterface<string|int, self>
Parameters
$roles : ExCollectionInterface|array<string|int, mixed>

Associative array where the LHS key is the position, and the RHS value is a Role object or a string ID, e.g. [1 => 'role_id_1', 3 => 'role_id_3'].

Tags
link
https://discord.com/developers/docs/resources/guild#modify-guild-role-positions
throws
NoPermissionsException

Missing manage_roles permission.

Return values
PromiseInterface<string|int, self>

updateWelcomeScreen()

Modify the guild's Welcome Screen. Requires the MANAGE_GUILD permission.

public updateWelcomeScreen(string|null $options) : PromiseInterface<string|int, WelcomeScreen>
Parameters
$options : string|null

['description'] The server description to show in the welcome screen (maximum 140).

Tags
link
https://discord.com/developers/docs/resources/guild#modify-guild-welcome-screen
throws
NoPermissionsException

Missing manage_guild permission.

Return values
PromiseInterface<string|int, WelcomeScreen>

The updated Welcome Screen.

updateWidgetSettings()

Modify a guild widget settings object for the guild. All attributes may be passed in with JSON and modified. Requires the MANAGE_GUILD permission.

public updateWidgetSettings(array<string|int, mixed> $options[, string|null $reason = null ]) : PromiseInterface
Parameters
$options : array<string|int, mixed>

An array of options. enabled => whether the widget is enabled channel_id => the widget channel id

$reason : string|null = null

Reason for Audit Log.

Tags
link
https://discord.com/developers/docs/resources/guild#modify-guild-widget
throws
NoPermissionsException

Missing manage_guild permission.

Return values
PromiseInterface

The updated guild widget object.

validateRegion()

Validates the specified region.

public validateRegion() : PromiseInterface

Use Channel::$rtc_region.

Tags
see
Guild::REGION_DEFAULT

The default region.

Return values
PromiseInterface

afterConstruct()

Called after the part has been constructed.

protected afterConstruct() : void

attributeCarbonHelper()

Helps with getting ISO8601 timestamp attributes.

protected attributeCarbonHelper(string $key) : Carbon|null
Parameters
$key : string

The attribute key.

Tags
throws
Exception
since
10.19.0
Return values
Carbon|null

attributeCollectionHelper()

Helps with getting Part attributes.

protected attributeCollectionHelper(string $key, string $class[, string|null $discrim = 'id' ]) : ExCollectionInterface
Parameters
$key : string

The attribute key.

$class : string

The attribute class.

$discrim : string|null = 'id'

The attribute discriminator.

Tags
throws
Exception
since
10.19.0
Return values
ExCollectionInterface

attributePartHelper()

Helps with getting Part attributes.

protected attributePartHelper(string $key, string $class[, array<string|int, mixed> $extraData = [] ]) : Part|null
Parameters
$key : string

The attribute key.

$class : string

The attribute class.

$extraData : array<string|int, mixed> = []

Extra data to pass to the part constructor.

Tags
throws
Exception
since
10.19.0
Return values
Part|null

attributeTypedCollectionHelper()

Helps with getting Part attributes for classes with extended types.

protected attributeTypedCollectionHelper(string $class, string $key) : ExCollectionInterface
Parameters
$class : string

The attribute class.

$key : string

The attribute key.

Return values
ExCollectionInterface

checkForGetMutator()

Checks if there is a get mutator present.

protected checkForGetMutator(string $key) : string|false
Parameters
$key : string

The attribute name to check.

Tags
since
10.0.0

Replaces checkForMutator($key, 'get')

Return values
string|false

Either a string if it is a method or false.

checkForSetMutator()

Checks if there is a set mutator present.

protected checkForSetMutator(string $key) : string|false
Parameters
$key : string

The attribute name to check.

Tags
since
10.0.0

Replaces checkForMutator($key, 'set')

Return values
string|false

Either a string if it is a method or false.

getAttribute()

Gets an attribute on the part.

protected getAttribute(string $key) : mixed
Parameters
$key : string

The key to the attribute.

Tags
throws
Exception
Return values
mixed

Either the attribute if it exists or void.

getFeatureAnimatedBannerAttribute()

protected getFeatureAnimatedBannerAttribute() : bool
Return values
bool

getFeatureAnimatedIconAttribute()

protected getFeatureAnimatedIconAttribute() : bool
Return values
bool

getFeatureApplicationCommandPermissionsV2Attribute()

protected getFeatureApplicationCommandPermissionsV2Attribute() : bool
Return values
bool

getFeatureAutoModerationAttribute()

protected getFeatureAutoModerationAttribute() : bool
Return values
bool

getFeatureBannerAttribute()

protected getFeatureBannerAttribute() : bool
Return values
bool

getFeatureCommunityAttribute()

protected getFeatureCommunityAttribute() : bool
Return values
bool

getFeatureCreatorMonetizableProvisionalAttribute()

protected getFeatureCreatorMonetizableProvisionalAttribute() : bool
Return values
bool

getFeatureCreatorStorePageAttribute()

protected getFeatureCreatorStorePageAttribute() : bool
Return values
bool

getFeatureDeveloperSupportServerAttribute()

protected getFeatureDeveloperSupportServerAttribute() : bool
Return values
bool

getFeatureDiscoverableAttribute()

protected getFeatureDiscoverableAttribute() : bool
Return values
bool

getFeatureEnhancedRoleColorsAttribute()

protected getFeatureEnhancedRoleColorsAttribute() : bool
Return values
bool

getFeatureFeaturableAttribute()

protected getFeatureFeaturableAttribute() : bool
Return values
bool

getFeatureGuestsEnabledAttribute()

protected getFeatureGuestsEnabledAttribute() : bool
Return values
bool

getFeatureGuildTagsAttribute()

protected getFeatureGuildTagsAttribute() : bool
Return values
bool

getFeatureHasDirectoryEntryAttribute()

protected getFeatureHasDirectoryEntryAttribute() : bool
Return values
bool

getFeatureInvitesDisabledAttribute()

protected getFeatureInvitesDisabledAttribute() : bool
Return values
bool

getFeatureInviteSplashAttribute()

protected getFeatureInviteSplashAttribute() : bool
Return values
bool

getFeatureLinkedToHubAttribute()

protected getFeatureLinkedToHubAttribute() : bool
Return values
bool

getFeatureMemberVerificationGateEnabledAttribute()

protected getFeatureMemberVerificationGateEnabledAttribute() : bool
Return values
bool

getFeatureMonetizationEnabledAttribute()

protected getFeatureMonetizationEnabledAttribute() : bool
Return values
bool

getFeatureMoreSoundboardAttribute()

protected getFeatureMoreSoundboardAttribute() : bool
Return values
bool

getFeatureMoreStickersAttribute()

protected getFeatureMoreStickersAttribute() : bool
Return values
bool

getFeatureNewsAttribute()

protected getFeatureNewsAttribute() : bool
Return values
bool

getFeaturePartneredAttribute()

protected getFeaturePartneredAttribute() : bool
Return values
bool

getFeaturePreviewEnabledAttribute()

protected getFeaturePreviewEnabledAttribute() : bool
Return values
bool

getFeaturePrivateThreadsAttribute()

protected getFeaturePrivateThreadsAttribute() : bool
Return values
bool

getFeatureRaidAlertsDisabledAttribute()

protected getFeatureRaidAlertsDisabledAttribute() : bool
Return values
bool

getFeatureRaidAlertsEnabledAttribute()

protected getFeatureRaidAlertsEnabledAttribute() : bool
Return values
bool

getFeatureRoleIconsAttribute()

protected getFeatureRoleIconsAttribute() : bool
Return values
bool

getFeatureRoleSubscriptionsAvailableForPurchaseAttribute()

protected getFeatureRoleSubscriptionsAvailableForPurchaseAttribute() : bool
Return values
bool

getFeatureRoleSubscriptionsEnabledAttribute()

protected getFeatureRoleSubscriptionsEnabledAttribute() : bool
Return values
bool

getFeatureSoundboardAttribute()

protected getFeatureSoundboardAttribute() : bool
Return values
bool

getFeatureTicketedEventsEnabledAttribute()

protected getFeatureTicketedEventsEnabledAttribute() : bool
Return values
bool

getFeatureVanityUrlAttribute()

protected getFeatureVanityUrlAttribute() : bool
Return values
bool

getFeatureVerifiedAttribute()

protected getFeatureVerifiedAttribute() : bool
Return values
bool

getFeatureVipRegionsAttribute()

protected getFeatureVipRegionsAttribute() : bool
Return values
bool

getFeatureWelcomeScreenEnabledAttribute()

protected getFeatureWelcomeScreenEnabledAttribute() : bool
Return values
bool

getIconHashAttribute()

Returns the guild icon hash.

protected getIconHashAttribute() : string|null
Return values
string|null

The guild icon hash or null.

getJoinedAtAttribute()

Returns the joined_at attribute.

protected getJoinedAtAttribute() : Carbon|null
Tags
throws
Exception
Return values
Carbon|null

The joined_at attribute.

getOwnerAttribute()

Returns the owner.

protected getOwnerAttribute() : User|null
Return values
User|null

getSplashHashAttribute()

Returns the guild splash hash.

protected getSplashHashAttribute() : string|null
Return values
string|null

The guild splash hash or null.

getWelcomeScreenAttribute()

Returns the Welcome Screen object for the guild.

protected getWelcomeScreenAttribute() : WelcomeScreen|null
Return values
WelcomeScreen|null

makeOptionalAttributes()

Return key-value attributes if it has been filled.

protected makeOptionalAttributes(array<string|int, mixed> $attributes) : array<string|int, mixed>

To be used with fields marked "optional?" from the API.

Parameters
$attributes : array<string|int, mixed>

Names of optional attribute

Return values
array<string|int, mixed>

setAttribute()

Sets an attribute on the part.

protected setAttribute(string $key, mixed $value) : void
Parameters
$key : string

The key to the attribute.

$value : mixed

The value of the attribute.

setChannelsAttribute()

protected setChannelsAttribute(array<string|int, mixed>|null $channels) : void
Parameters
$channels : array<string|int, mixed>|null
Tags
inheritDoc

setEmojisAttribute()

Sets the emojis attribute.

protected setEmojisAttribute(array<string|int, mixed>|null $emojis) : void
Parameters
$emojis : array<string|int, mixed>|null

setStickersAttribute()

Sets the stickers attribute.

protected setStickersAttribute(array<string|int, mixed>|null $stickers) : void
Parameters
$stickers : array<string|int, mixed>|null

studly()

Converts a string to studlyCase.

private static studly(string $string) : string

This is a port of updated Laravel's implementation, a non-regex with static cache. The Discord\studly() is kept due to unintended bug and we do not want to introduce BC by replacing it. This method is private static as we may move it outside this class in future.

Parameters
$string : string

The string to convert.

Tags
since
10.0.0
Return values
string

        
On this page

Search results