@@ -8,14 +8,6 @@ namespace Discord | |||||
/// </summary> | /// </summary> | ||||
public interface IChannel : ISnowflakeEntity | public interface IChannel : ISnowflakeEntity | ||||
{ | { | ||||
/// <summary> | |||||
/// Gets the name of this channel. | |||||
/// </summary> | |||||
/// <returns> | |||||
/// A string containing the name of this channel. | |||||
/// </returns> | |||||
string Name { get; } | |||||
/// <summary> | /// <summary> | ||||
/// Gets a collection of all users in this channel. | /// Gets a collection of all users in this channel. | ||||
/// </summary> | /// </summary> | ||||
@@ -12,6 +12,14 @@ namespace Discord | |||||
/// <seealso cref="ICategoryChannel"/> | /// <seealso cref="ICategoryChannel"/> | ||||
public interface IGuildChannel : IChannel, IDeletable | public interface IGuildChannel : IChannel, IDeletable | ||||
{ | { | ||||
/// <summary> | |||||
/// Gets the name of this channel. | |||||
/// </summary> | |||||
/// <returns> | |||||
/// A string containing the name of this channel. | |||||
/// </returns> | |||||
string Name { get; } | |||||
/// <summary> | /// <summary> | ||||
/// Gets the position of this channel. | /// Gets the position of this channel. | ||||
/// </summary> | /// </summary> | ||||
@@ -204,7 +204,7 @@ namespace Discord | |||||
{ | { | ||||
if (mode != TagHandling.Remove) | if (mode != TagHandling.Remove) | ||||
{ | { | ||||
var channel = tag.Value as IChannel; | |||||
var channel = tag.Value as IGuildChannel; | |||||
switch (mode) | switch (mode) | ||||
{ | { | ||||
case TagHandling.Name: | case TagHandling.Name: | ||||
@@ -54,8 +54,6 @@ namespace Discord.Rest | |||||
public virtual Task UpdateAsync(RequestOptions options = null) => Task.Delay(0); | public virtual Task UpdateAsync(RequestOptions options = null) => Task.Delay(0); | ||||
//IChannel | //IChannel | ||||
/// <inheritdoc /> | |||||
string IChannel.Name => null; | |||||
/// <inheritdoc /> | /// <inheritdoc /> | ||||
Task<IUser> IChannel.GetUserAsync(ulong id, CacheMode mode, RequestOptions options) | Task<IUser> IChannel.GetUserAsync(ulong id, CacheMode mode, RequestOptions options) | ||||
@@ -210,8 +210,6 @@ namespace Discord.Rest | |||||
=> await SendMessageAsync(text, isTTS, embed, options).ConfigureAwait(false); | => await SendMessageAsync(text, isTTS, embed, options).ConfigureAwait(false); | ||||
//IChannel | //IChannel | ||||
/// <inheritdoc /> | |||||
string IChannel.Name => $"@{Recipient}"; | |||||
/// <inheritdoc /> | /// <inheritdoc /> | ||||
Task<IUser> IChannel.GetUserAsync(ulong id, CacheMode mode, RequestOptions options) | Task<IUser> IChannel.GetUserAsync(ulong id, CacheMode mode, RequestOptions options) | ||||
@@ -58,8 +58,6 @@ namespace Discord.WebSocket | |||||
internal SocketChannel Clone() => MemberwiseClone() as SocketChannel; | internal SocketChannel Clone() => MemberwiseClone() as SocketChannel; | ||||
//IChannel | //IChannel | ||||
/// <inheritdoc /> | |||||
string IChannel.Name => null; | |||||
/// <inheritdoc /> | /// <inheritdoc /> | ||||
Task<IUser> IChannel.GetUserAsync(ulong id, CacheMode mode, RequestOptions options) | Task<IUser> IChannel.GetUserAsync(ulong id, CacheMode mode, RequestOptions options) | ||||
@@ -300,8 +300,6 @@ namespace Discord.WebSocket | |||||
=> await SendMessageAsync(text, isTTS, embed, options).ConfigureAwait(false); | => await SendMessageAsync(text, isTTS, embed, options).ConfigureAwait(false); | ||||
//IChannel | //IChannel | ||||
/// <inheritdoc /> | |||||
string IChannel.Name => $"@{Recipient}"; | |||||
/// <inheritdoc /> | /// <inheritdoc /> | ||||
Task<IUser> IChannel.GetUserAsync(ulong id, CacheMode mode, RequestOptions options) | Task<IUser> IChannel.GetUserAsync(ulong id, CacheMode mode, RequestOptions options) | ||||