Manage channels

Explanation about how to manage channels on a guild

Create a channel

$guild->createChannel($name, $type = 0, $position = 0, $permissionOverwrites = [], $parentId = null, $topic = null, $userLimit = null, $rateLimit = null, $bitrate = null, $nsfw = false); 

$name is the name of the new channel

Any parameter from here is optional / can be set with the default value!

$type is the type of the new channel (as integer) see a list of all channel types Here

$position the positon of the new channel in the parent. 0 is the deepest

$permissionOverwrites an array of Permission Overwrite objects

$parentId the ID for the category the new channel belong to

Only Text: $topic the topic of a channel

Only Voice: $userLimit a maximum amount of users to join the voice channel (0-99)

Only Text: $rateLimit the time in seconds a user has to wait until he can send a new message (0-21600)

Only Voice: $bitrate the bitrate (obv. in bits) for the channel, for normal guilds a value between 0-96000, for partners 128000

Only Text: $nsfw Select whether this channel is a NSFW channel or not

Returns a Channel object on success

Get Channels

To get a channel by snowflake from cache, use:

To get all channels use:

Delete Channels

For this, please refere to

Last updated