Interface IVoiceChannel
Represents a generic voice channel in a guild.
Inherited Members
Namespace: Discord
Assembly: Discord.Net.Core.dll
Syntax
public interface IVoiceChannel : IMessageChannel, INestedChannel, IGuildChannel, IDeletable, IAudioChannel, IChannel, ISnowflakeEntity, IEntity<ulong>, IMentionable
Properties
| Improve this Doc View SourceBitrate
Gets the bit-rate that the clients in this voice channel are requested to use.
Declaration
int Bitrate { get; }
Property Value
Type | Description |
---|---|
Int32 | An |
UserLimit
Gets the max number of users allowed to be connected to this channel at once.
Declaration
int? UserLimit { get; }
Property Value
Type | Description |
---|---|
Nullable<Int32> | An |
Methods
| Improve this Doc View SourceDeleteMessagesAsync(IEnumerable<IMessage>, RequestOptions)
Bulk-deletes multiple messages.
Declaration
Task DeleteMessagesAsync(IEnumerable<IMessage> messages, RequestOptions options = null)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IMessage> | messages | The messages to be bulk-deleted. |
RequestOptions | options | The options to be used when sending the request. |
Returns
Type | Description |
---|---|
Task | A task that represents the asynchronous bulk-removal operation. |
Remarks
This method attempts to remove the messages specified in bulk.
important
Due to the limitation set by Discord, this method can only remove messages that are posted within 14 days!
Examples
The following example gets 250 messages from the channel and deletes them.
var messages = await voiceChannel.GetMessagesAsync(250).FlattenAsync();
await voiceChannel.DeleteMessagesAsync(messages);
|
Improve this Doc
View Source
DeleteMessagesAsync(IEnumerable<UInt64>, RequestOptions)
Bulk-deletes multiple messages.
Declaration
Task DeleteMessagesAsync(IEnumerable<ulong> messageIds, RequestOptions options = null)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<UInt64> | messageIds | The snowflake identifier of the messages to be bulk-deleted. |
RequestOptions | options | The options to be used when sending the request. |
Returns
Type | Description |
---|---|
Task | A task that represents the asynchronous bulk-removal operation. |
Remarks
This method attempts to remove the messages specified in bulk.
important
Due to the limitation set by Discord, this method can only remove messages that are posted within 14 days!
ModifyAsync(Action<VoiceChannelProperties>, RequestOptions)
Modifies this voice channel.
Declaration
Task ModifyAsync(Action<VoiceChannelProperties> func, RequestOptions options = null)
Parameters
Type | Name | Description |
---|---|---|
Action<VoiceChannelProperties> | func | The properties to modify the channel with. |
RequestOptions | options | The options to be used when sending the request. |
Returns
Type | Description |
---|---|
Task | A task that represents the asynchronous modification operation. |