Description

The guild model represents a guild that exists on Discord. An instance of a guild model contains basic information about the guild.

Attributes

A guild model will represent the Discord Guild structure when successfully returned. You can access these directly using the -> operator.

Functions

fromId($guildid)

Returns a guild object from the provided guild id.



//...

if ($guild = Guild::fromId(662460663167320084))
{
    {{ $guild->name }}
}

            

Collections


channels

Returns a collection of channels that the guild has.



//...

@foreach ($guild->channels as $channel)
    {{ $channel->name }}
@endforeach

            

roles

Returns a collection of roles that the guild has.



//...

@foreach ($guild->roles as $role)
    {{ $role->name }}
@endforeach