Documentation

Guild extends Part
in package

A Guild is Discord's equivalent of a server. It contains all the Members, Channels, Roles, Bans etc.

Table of Contents

LEVEL_DOUBLE_TABLEFLIP  = 4
LEVEL_LOW  = 1
LEVEL_MEDIUM  = 2
LEVEL_OFF  = 0
LEVEL_TABLEFLIP  = 3
REGION_DEFAULT  = 'us_west'
SUPPRESS_JOIN_NOTIFICATIONS  = 1 << 0
SUPPRESS_PREMIUM_SUBSCRIPTION  = 1 << 1
$afk_channel_id  : string
$afk_timeout  : int
$application_id  : string
$approximate_member_count  : int
$approximate_presence_count  : int
$banner  : string
$bans  : BanRepository
$channels  : ChannelRepository
$created  : bool
Is the part already created in the Discord servers?
$default_message_notifications  : int
$description  : string
$discovery_splash  : string
$emojis  : EmojiRepository
$explicit_content_filter  : int
$feature_animated_icon  : bool
$feature_banner  : bool
$feature_commerce  : bool
$feature_community  : bool
$feature_discoverable  : bool
$feature_featurable  : bool
$feature_invite_splash  : bool
$feature_member_verification_gate_enabled  : bool
$feature_monetization_enabled  : bool
$feature_more_stickers  : bool
$feature_news  : bool
$feature_partnered  : bool
$feature_preview_enabled  : bool
$feature_private_threads  : bool
$feature_seven_day_thread_archive  : bool
$feature_three_day_thread_archive  : 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>
$icon  : string
$icon_hash  : string
$id  : string
$invites  : InviteRepository
$joined_at  : Carbon
$large  : bool
$max_members  : int
$max_presences  : int
$max_video_channel_users  : int
$member_count  : int
$members  : MemberRepository
$mfa_level  : int
$name  : string
$owner  : User
$owner_id  : string
$preferred_locale  : string
$premium_subscription_count  : int
$premium_tier  : int
$public_updates_channel_id  : string
$region  : string
$roles  : RoleRepository
$rules_channel_id  : string
$scriptData  : mixed
Custom script data.
$splash  : string
$splash_hash  : string
$system_channel_flags  : int
$system_channel_id  : string
$vanity_url_code  : string
$verification_level  : int
$voice_states  : array<string|int, object>
$widget_channel_id  : string
$widget_enabled  : bool
$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.
$fillAfterSave  : bool
Should we fill the part after saving?
$hidden  : array<string|int, mixed>
Attributes that are hidden from debug info.
$http  : Http
The HTTP client.
$regex  : string
The regex pattern to replace variables with.
$regions  : Collection|null
An array of valid regions.
$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.
__construct()  : mixed
Create a new part instance.
__debugInfo()  : array<string|int, mixed>
Handles debug calls from var_dump and similar functions.
__get()  : mixed
Handles dynamic get calls onto the part.
__set()  : mixed
Handles dynamic set calls onto the part.
__toString()  : string
Converts the part to a string.
createdTimestamp()  : float
Returns the timestamp of when the guild was created.
createRole()  : ExtendedPromiseInterface
Creates a role.
fetch()  : ExtendedPromiseInterface<string|int, static>
Fetches any missing information about the part from Discord's servers.
fill()  : void
Fills the parts attributes from an array.
getAuditLog()  : ExtendedPromiseInterface
Returns an audit log object for the query.
getCreatableAttributes()  : array<string|int, mixed>
Returns the attributes needed to create.
getIconAttribute()  : string|null
Returns the guilds icon.
getInvites()  : ExtendedPromiseInterface
Returns the channels invites.
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>
Gets the attributes to pass to repositories.
getSplashAttribute()  : string|null
Returns the guild splash.
getUpdatableAttributes()  : array<string|int, mixed>
Returns the updatable attributes.
getVoiceRegions()  : ExtendedPromiseInterface
Gets the voice regions available.
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()  : ExtendedPromiseInterface
Leaves the guild.
offsetExists()  : bool
Checks if an attribute exists via key. Used for ArrayAccess.
offsetGet()  : mixed
Gets an attribute via key. Used for ArrayAccess.
offsetSet()  : mixed
Sets an attribute via key. Used for ArrayAccess.
offsetUnset()  : mixed
Unsets an attribute via key. Used for ArrayAccess.
serialize()  : string
Serializes the data. Used for Serializable.
transferOwnership()  : ExtendedPromiseInterface
Transfers ownership of the guild to another member.
unban()  : ExtendedPromiseInterface
Unbans a member. Alias for `$guild->bans->unban($user)`.
unserialize()  : mixed
Unserializes some data and stores it. Used for Serializable.
updateRolePositions()  : ExtendedPromiseInterface
Updates the positions of a list of given roles.
validateRegion()  : ExtendedPromiseInterface
Validates the specified region.
afterConstruct()  : void
Called after the part has been constructed.
getFeatureAnimatedIconAttribute()  : bool
getFeatureBannerAttribute()  : bool
getFeatureCommerceAttribute()  : bool
getFeatureDiscoverableAttribute()  : bool
getFeatureFeaturableAttribute()  : bool
getFeatureInviteSplashAttribute()  : bool
getFeatureMemberVerificationGateEnabledAttribute()  : bool
getFeatureMonetizationEnabledAttribute()  : bool
getFeatureMoreStickersAttribute()  : bool
getFeatureNewsAttribute()  : bool
getFeaturePartneredAttribute()  : bool
getFeaturePreviewEnabledAttribute()  : bool
getFeaturePrivateThreadsAttribute()  : bool
getFeatureSevenDayThreadArchiveAttribute()  : bool
getFeatureThreeDayThreadArchiveAttribute()  : bool
getFeatureTicketedEventsEnabledAttribute()  : bool
getFeatureVanityUrlAttribute()  : bool
getFeatureVerifiedAttribute()  : bool
getFeatureVipRegionsAttribute()  : bool
getFeatureWelcomeScreenEnabledAttribute()  : bool
getIconHashAttribute()  : string|null
Returns the guild icon hash.
getJoinedAtAttribute()  : Carbon|null
Returns the joined_at attribute.
getOwnerAttribute()  : ExtendedPromiseInterface
Returns the owner.
getSplashHashAttribute()  : string|null
Returns the guild splash hash.
checkForMutator()  : string|false
Checks if there is a mutator present.
getAttribute()  : mixed
Gets an attribute on the part.
setAttribute()  : void
Sets an attribute on the part.

Constants

LEVEL_DOUBLE_TABLEFLIP

public mixed LEVEL_DOUBLE_TABLEFLIP = 4

LEVEL_LOW

public mixed LEVEL_LOW = 1

LEVEL_MEDIUM

public mixed LEVEL_MEDIUM = 2

LEVEL_OFF

public mixed LEVEL_OFF = 0

LEVEL_TABLEFLIP

public mixed LEVEL_TABLEFLIP = 3

REGION_DEFAULT

public mixed REGION_DEFAULT = 'us_west'

SUPPRESS_JOIN_NOTIFICATIONS

public mixed SUPPRESS_JOIN_NOTIFICATIONS = 1 << 0

SUPPRESS_PREMIUM_SUBSCRIPTION

public mixed SUPPRESS_PREMIUM_SUBSCRIPTION = 1 << 1

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 you will remain in the voice channel until you are moved into the AFK channel.

$application_id

public string $application_id

Application that made the guild, if made by one.

$approximate_member_count

public int $approximate_member_count

$approximate_presence_count

public int $approximate_presence_count

$banner

public string $banner

Banner hash.

$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.

$description

public string $description

Guild description if it is discoverable.

$discovery_splash

public string $discovery_splash

Discovery splash hash. Only for discoverable guilds.

$explicit_content_filter

public int $explicit_content_filter

Explicit content filter level.

$feature_animated_icon

public bool $feature_animated_icon

guild has access to set an animated guild icon.

$feature_banner

public bool $feature_banner

guild has access to set a guild banner image.

$feature_commerce

public bool $feature_commerce

guild has access to use commerce features (create store channels).

$feature_community

public bool $feature_community

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

$feature_discoverable

public bool $feature_discoverable

guild is able to be discovered in the directory.

$feature_featurable

public bool $feature_featurable

guild is able to be featured in the directory.

$feature_invite_splash

public bool $feature_invite_splash

guild has access to set an invite splash background.

$feature_member_verification_gate_enabled

public bool $feature_member_verification_gate_enabled

guild has enabled membership screening.

$feature_monetization_enabled

public bool $feature_monetization_enabled

guild has enabled monetization.

$feature_more_stickers

public bool $feature_more_stickers

guild has increased custom sticker slots.

$feature_news

public bool $feature_news

guild has access to create news channels.

$feature_partnered

public bool $feature_partnered

guild is partnered.

$feature_preview_enabled

public bool $feature_preview_enabled

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

$feature_private_threads

public bool $feature_private_threads

guild has access to create private threads.

$feature_seven_day_thread_archive

public bool $feature_seven_day_thread_archive

guild has access to the seven day archive time for threads.

$feature_three_day_thread_archive

public bool $feature_three_day_thread_archive

guild has access to the three day archive time for threads.

$feature_ticketed_events_enabled

public bool $feature_ticketed_events_enabled

guild has enabled ticketed events.

$feature_vanity_url

public bool $feature_vanity_url

guild has access to set a vanity url.

$feature_verified

public bool $feature_verified

guild is verified.

$feature_vip_regions

public bool $feature_vip_regions

guild has access to set 384kbps bitrate in voice.

$feature_welcome_screen_enabled

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.

$icon

public string $icon

The URL to the guild icon.

$icon_hash

public string $icon_hash

The icon hash for the guild.

$id

public string $id

The unique identifier of the guild.

$joined_at

public Carbon $joined_at

A timestamp of when the current user joined the guild.

$large

public bool $large

Whether the guild is considered 'large' (over 250 members).

$max_members

public int $max_members

Maximum amount of members allowed in the guild.

$max_presences

public int $max_presences

Maximum amount of presences allowed in the guild.

$max_video_channel_users

public int $max_video_channel_users

Maximum amount of users allowed in a video channel.

$member_count

public int $member_count

How many members are in the guild.

$mfa_level

public int $mfa_level

MFA level required to join.

$name

public string $name

The name of the guild.

$owner

public User $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_subscription_count

public int $premium_subscription_count

Number of boosts in the guild.

$premium_tier

public int $premium_tier

Server boost level.

$public_updates_channel_id

public string $public_updates_channel_id

Notice channel id.

$region

public string $region

The region the guild's voice channels are hosted in.

$rules_channel_id

public string $rules_channel_id

Channel that the rules are in.

$scriptData

Custom script data.

public mixed $scriptData

Used for storing custom information, used by end products.

$splash

public string $splash

The URL to the guild splash.

$splash_hash

public string $splash_hash

The splash hash for the guild.

$system_channel_flags

public int $system_channel_flags

Flags for the system channel.

$system_channel_id

public string $system_channel_id

Channel that system notifications are posted in.

$vanity_url_code

public string $vanity_url_code

Vanity URL code for the guild.

$verification_level

public int $verification_level

The verification level used for the guild.

$voice_states

public array<string|int, object> $voice_states

Array of voice states.

$widget_channel_id

public string $widget_channel_id

Channel that the widget will create an invite to.

$widget_enabled

public bool $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', 'region', 'owner_id', 'roles', 'joined_at', 'afk_channel_id', 'afk_timeout', 'features', 'splash', 'discovery_splash', 'emojis', 'large', 'verification_level', 'member_count', 'default_message_notifications', 'explicit_content_filter', 'mfa_level', 'application_id', 'widget_enabled', 'widget_channel_id', 'system_channel_id', 'system_channel_flags', 'rules_channel_id', 'voice_states', 'max_presences', 'max_members', 'vanity_url_code', 'description', 'banner', 'premium_tier', 'premium_subscription_count', 'preferred_locale', 'public_updates_channel_id', 'max_video_channel_users', 'approximate_member_count', 'approximate_presence_count']

The array of attributes that can be mass-assigned.

Tags
inheritdoc

$fillAfterSave

Should we fill the part after saving?

protected bool $fillAfterSave = true

Whether the part will be saved after being filled.

$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.

$regex

The regex pattern to replace variables with.

protected string $regex = '/:([a-z_]+)/'

The regex which is used to replace placeholders.

$repositories

An array of repositories that can exist in a part.

protected array<string|int, mixed> $repositories = ['members' => DiscordRepositoryGuildMemberRepository::class, 'roles' => DiscordRepositoryGuildRoleRepository::class, 'channels' => DiscordRepositoryGuildChannelRepository::class, 'bans' => DiscordRepositoryGuildBanRepository::class, 'invites' => DiscordRepositoryGuildInviteRepository::class, 'emojis' => DiscordRepositoryGuildEmojiRepository::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_icon', 'feature_banner', 'feature_commerce', 'feature_community', 'feature_discoverable', 'feature_featurable', 'feature_invite_splash', 'feature_member_verification_gate_enabled', 'feature_news', 'feature_partnered', 'feature_preview_enabled', 'feature_vanity_url', 'feature_verified', 'feature_vip_regions', 'feature_welcome_screen_enabled', 'feature_ticketed_events_enabled', 'feature_monetization_enabled', 'feature_more_stickers', 'feature_three_day_thread_archive', 'feature_seven_day_thread_archive', 'feature_private_threads']
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.

Return values
mixed

__debugInfo()

Handles debug calls from var_dump and similar functions.

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

This function forwards onto getPublicAttributes.

Return values
array<string|int, mixed>

An array of public attributes.

__get()

Handles dynamic get calls onto the part.

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

The attributes key.

Tags
throws
Exception
see
self::getAttribute()

This function forwards onto getAttribute.

Return values
mixed

The value of the attribute.

__set()

Handles dynamic set calls onto the part.

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

The attributes key.

$value : mixed

The attributes value.

Tags
see
self::setAttribute()

This function forwards onto setAttribute.

Return values
mixed

__toString()

Converts the part to a string.

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

This function encodes getPublicAttributes into JSON.

Return values
string

A JSON string of attributes.

createdTimestamp()

Returns the timestamp of when the guild was created.

public createdTimestamp() : float
Return values
float

createRole()

Creates a role.

public createRole([array<string|int, mixed> $data = [] ]) : ExtendedPromiseInterface
Parameters
$data : array<string|int, mixed> = []

The data to fill the role with.

Tags
throws
Exception
Return values
ExtendedPromiseInterface

fetch()

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

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

The part is not fetchable.

Return values
ExtendedPromiseInterface<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.

Return values
void

getAuditLog()

Returns an audit log object for the query.

public getAuditLog([array<string|int, mixed> $options = [] ]) : ExtendedPromiseInterface
Parameters
$options : array<string|int, mixed> = []

An array of options. user_id => filter the log for actions made by a user action_type => the type of audit log event before => filter the log before a certain entry id limit => how many entries are returned (default 50, minimum 1, maximum 100)

Return values
ExtendedPromiseInterface

getCreatableAttributes()

Returns the attributes needed to create.

public getCreatableAttributes() : array<string|int, mixed>
Tags
inheritdoc
Return values
array<string|int, mixed>

getIconAttribute()

Returns the guilds icon.

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

The image format.

$size : int = 1024

The size of the image.

Return values
string|null

The URL to the guild icon or null.

getInvites()

Returns the channels invites.

public getInvites() : ExtendedPromiseInterface
Tags
throws
Exception
Return values
ExtendedPromiseInterface

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()

Gets the attributes to pass to repositories.

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

Attributes.

getSplashAttribute()

Returns the guild splash.

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

The image format.

$size : int = 2048

The size of the image.

Return values
string|null

The URL to the guild splash or null.

getUpdatableAttributes()

Returns the updatable attributes.

public getUpdatableAttributes() : array<string|int, mixed>
Tags
inheritdoc
Return values
array<string|int, mixed>

getVoiceRegions()

Gets the voice regions available.

public getVoiceRegions() : ExtendedPromiseInterface
Return values
ExtendedPromiseInterface

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
self::getPublicAttributes()

This function forwards onto getPublicAttributes.

Return values
array<string|int, mixed>

An array of public attributes.

leave()

Leaves the guild.

public leave() : ExtendedPromiseInterface
Return values
ExtendedPromiseInterface

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
self::getAttribute()

This function forwards onto getAttribute.

Return values
mixed

offsetSet()

Sets an attribute via key. Used for ArrayAccess.

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

The attribute key.

$value : mixed

The attribute value.

Tags
see
self::setAttribute()

This function forwards onto setAttribute.

Return values
mixed

offsetUnset()

Unsets an attribute via key. Used for ArrayAccess.

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

The attribute key.

Return values
mixed

serialize()

Serializes the data. Used for Serializable.

public serialize() : string
Return values
string

A string of serialized data.

transferOwnership()

Transfers ownership of the guild to another member.

public transferOwnership(Member|int $member) : ExtendedPromiseInterface
Parameters
$member : Member|int

The member to transfer ownership to.

Return values
ExtendedPromiseInterface

unban()

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

public unban(User|string $user) : ExtendedPromiseInterface
Parameters
$user : User|string
Return values
ExtendedPromiseInterface

unserialize()

Unserializes some data and stores it. Used for Serializable.

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

Some serialized data.

Tags
see
self::setAttribute()

The unserialized data is stored with setAttribute.

Return values
mixed

updateRolePositions()

Updates the positions of a list of given roles.

public updateRolePositions(array<string|int, mixed> $roles) : ExtendedPromiseInterface

The $roles array should be an 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'].

Parameters
$roles : array<string|int, mixed>
Return values
ExtendedPromiseInterface

validateRegion()

Validates the specified region.

public validateRegion() : ExtendedPromiseInterface
Tags
see
self::REGION_DEFAULT

The default region.

Return values
ExtendedPromiseInterface

afterConstruct()

Called after the part has been constructed.

protected afterConstruct() : void
Return values
void

getFeatureAnimatedIconAttribute()

protected getFeatureAnimatedIconAttribute() : bool
Return values
bool

getFeatureBannerAttribute()

protected getFeatureBannerAttribute() : bool
Return values
bool

getFeatureCommerceAttribute()

protected getFeatureCommerceAttribute() : bool
Return values
bool

getFeatureDiscoverableAttribute()

protected getFeatureDiscoverableAttribute() : bool
Return values
bool

getFeatureFeaturableAttribute()

protected getFeatureFeaturableAttribute() : bool
Return values
bool

getFeatureInviteSplashAttribute()

protected getFeatureInviteSplashAttribute() : bool
Return values
bool

getFeatureMemberVerificationGateEnabledAttribute()

protected getFeatureMemberVerificationGateEnabledAttribute() : bool
Return values
bool

getFeatureMonetizationEnabledAttribute()

protected getFeatureMonetizationEnabledAttribute() : 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

getFeatureSevenDayThreadArchiveAttribute()

protected getFeatureSevenDayThreadArchiveAttribute() : bool
Return values
bool

getFeatureThreeDayThreadArchiveAttribute()

protected getFeatureThreeDayThreadArchiveAttribute() : 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() : ExtendedPromiseInterface
Return values
ExtendedPromiseInterface

getSplashHashAttribute()

Returns the guild splash hash.

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

The guild splash hash or null.

checkForMutator()

Checks if there is a mutator present.

private checkForMutator(string $key, string $type) : string|false
Parameters
$key : string

The attribute name to check.

$type : string

Either get or set.

Return values
string|false

Either a string if it is callable or false.

getAttribute()

Gets an attribute on the part.

private 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.

setAttribute()

Sets an attribute on the part.

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

The key to the attribute.

$value : mixed

The value of the attribute.

Return values
void

Search results