feature: IVoiceChannel implements IMentionable (#1896)
This commit is contained in:
@@ -6,7 +6,7 @@ namespace Discord
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents a generic voice channel in a guild.
|
/// Represents a generic voice channel in a guild.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IVoiceChannel : INestedChannel, IAudioChannel
|
public interface IVoiceChannel : INestedChannel, IAudioChannel, IMentionable
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the bit-rate that the clients in this voice channel are requested to use.
|
/// Gets the bit-rate that the clients in this voice channel are requested to use.
|
||||||
|
|||||||
@@ -21,6 +21,9 @@ namespace Discord.Rest
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public ulong? CategoryId { get; private set; }
|
public ulong? CategoryId { get; private set; }
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public string Mention => MentionUtils.MentionChannel(Id);
|
||||||
|
|
||||||
internal RestVoiceChannel(BaseDiscordClient discord, IGuild guild, ulong id)
|
internal RestVoiceChannel(BaseDiscordClient discord, IGuild guild, ulong id)
|
||||||
: base(discord, guild, id)
|
: base(discord, guild, id)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ namespace Discord.WebSocket
|
|||||||
public int Bitrate { get; private set; }
|
public int Bitrate { get; private set; }
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public int? UserLimit { get; private set; }
|
public int? UserLimit { get; private set; }
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public ulong? CategoryId { get; private set; }
|
public ulong? CategoryId { get; private set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -30,6 +31,10 @@ namespace Discord.WebSocket
|
|||||||
/// </returns>
|
/// </returns>
|
||||||
public ICategoryChannel Category
|
public ICategoryChannel Category
|
||||||
=> CategoryId.HasValue ? Guild.GetChannel(CategoryId.Value) as ICategoryChannel : null;
|
=> CategoryId.HasValue ? Guild.GetChannel(CategoryId.Value) as ICategoryChannel : null;
|
||||||
|
|
||||||
|
/// <inheritdoc />
|
||||||
|
public string Mention => MentionUtils.MentionChannel(Id);
|
||||||
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public Task SyncPermissionsAsync(RequestOptions options = null)
|
public Task SyncPermissionsAsync(RequestOptions options = null)
|
||||||
=> ChannelHelper.SyncPermissionsAsync(this, Discord, options);
|
=> ChannelHelper.SyncPermissionsAsync(this, Discord, options);
|
||||||
|
|||||||
@@ -12,6 +12,8 @@ namespace Discord
|
|||||||
|
|
||||||
public int? UserLimit => throw new NotImplementedException();
|
public int? UserLimit => throw new NotImplementedException();
|
||||||
|
|
||||||
|
public string Mention => throw new NotImplementedException();
|
||||||
|
|
||||||
public ulong? CategoryId => throw new NotImplementedException();
|
public ulong? CategoryId => throw new NotImplementedException();
|
||||||
|
|
||||||
public int Position => throw new NotImplementedException();
|
public int Position => throw new NotImplementedException();
|
||||||
|
|||||||
Reference in New Issue
Block a user