Class RestVoiceChannel
Represents a REST-based voice channel in a guild.
public class RestVoiceChannel : RestTextChannel, IUpdateable, IRestMessageChannel, IVoiceChannel, ITextChannel, IMessageChannel, IMentionable, INestedChannel, IIntegrationChannel, IGuildChannel, IDeletable, IRestAudioChannel, IAudioChannel, IChannel, ISnowflakeEntity, IEntity<ulong>
- Inheritance
-
RestVoiceChannel
- Implements
- Derived
- Inherited Members
- Extension Methods
Properties
Bitrate
Gets the bit-rate that the clients in this voice channel are requested to use.
public int Bitrate { get; }
Property Value
- int
An int representing the bit-rate (bps) that this voice channel defines and requests the client(s) to use.
IsTextInVoice
Gets whether or not the guild has Text-In-Voice enabled and the voice channel is a TiV channel.
[Obsolete("This property is no longer used because Discord enabled text-in-voice for all channels.")]
public virtual bool IsTextInVoice { get; }
Property Value
RTCRegion
Gets the RTC region for this audio channel.
public string RTCRegion { get; }
Property Value
Remarks
This property can be null.
UserLimit
Gets the max number of users allowed to be connected to this channel at once.
public int? UserLimit { get; }
Property Value
- int?
An int representing the maximum number of users that are allowed to be connected to this channel at once; null if a limit is not set.
VideoQualityMode
Gets the video quality mode for this channel.
public VideoQualityMode VideoQualityMode { get; }
Property Value
Methods
CreateThreadAsync(string, ThreadType, ThreadArchiveDuration, IMessage, bool?, int?, RequestOptions)
Creates a thread within this ITextChannel.
public override Task<RestThreadChannel> CreateThreadAsync(string name, ThreadType type = ThreadType.PublicThread, ThreadArchiveDuration autoArchiveDuration = ThreadArchiveDuration.OneDay, IMessage message = null, bool? invitable = null, int? slowmode = null, RequestOptions options = null)
Parameters
namestringThe name of the thread.
typeThreadTypeThe type of the thread.
Note: This parameter is not used if the
messageparameter is not specified.autoArchiveDurationThreadArchiveDurationThe duration on which this thread archives after.
messageIMessageThe message which to start the thread from.
invitablebool?slowmodeint?optionsRequestOptionsThe options to be used when sending the request.
Returns
- Task<RestThreadChannel>
A task that represents the asynchronous create operation. The task result contains a IThreadChannel
Remarks
When message is null the thread type will be based off of the
channel its created in. When called on a ITextChannel, it creates a PublicThread.
When called on a INewsChannel, it creates a NewsThread. The id of the created
thread will be the same as the id of the message, and as such a message can only have a
single thread created from it.
Exceptions
- InvalidOperationException
Cannot create a thread within a voice channel.
GetActiveThreadsAsync(RequestOptions)
Gets a collection of active threads within this channel.
public override Task<IReadOnlyCollection<RestThreadChannel>> GetActiveThreadsAsync(RequestOptions options = null)
Parameters
optionsRequestOptionsThe options to be used when sending the request.
Returns
- Task<IReadOnlyCollection<RestThreadChannel>>
A task that represents an asynchronous get operation for retrieving the threads. The task result contains a collection of active threads.
Exceptions
- NotSupportedException
Threads are not supported in voice channels
ModifyAsync(Action<VoiceChannelProperties>, RequestOptions)
Modifies this voice channel.
public Task ModifyAsync(Action<VoiceChannelProperties> func, RequestOptions options = null)
Parameters
funcAction<VoiceChannelProperties>The properties to modify the channel with.
optionsRequestOptionsThe options to be used when sending the request.
Returns
- Task
A task that represents the asynchronous modification operation.
- See Also
SetStatusAsync(string, RequestOptions)
Sets the voice channel status in the current channel.
public virtual Task SetStatusAsync(string status, RequestOptions options = null)
Parameters
statusstringThe string to set as status.
optionsRequestOptionsThe options to be used when sending the request.
Returns
- Task
A task that represents the asynchronous modification operation.