Discore
Show / Hide Table of Contents

Method CanJoinVoiceChannel

| Improve this Doc View Source

CanJoinVoiceChannel(IDiscordGuildMember, DiscordGuild, DiscordGuildVoiceChannel, int?)

Returns whether this guild member can join a given voice channel.

Declaration
public static bool CanJoinVoiceChannel(this IDiscordGuildMember member, DiscordGuild guild, DiscordGuildVoiceChannel voiceChannel, int? usersInVoiceChannel = null)
Parameters
Type Name Description
IDiscordGuildMember member
DiscordGuild guild

The guild the member is in.

DiscordGuildVoiceChannel voiceChannel

The voice channel to check if the member can join.

int? usersInVoiceChannel

The number of users currently in the voiceChannel. If null, this will not be checked and it will be assumed that there is room in the channel.

Returns
Type Description
bool
Exceptions
Type Condition
ArgumentException

Thrown if member or voiceChannel is not in the specified guild

ArgumentNullException

Thrown if member, guild, or voiceChannel is null.

  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX