Browse Source

Clarify overridden props in SocketNewsChannel

pull/1379/head
Still Hsu 6 years ago
parent
commit
280dfc8249
No known key found for this signature in database GPG Key ID: C176DD7907FF62A7
1 changed files with 53 additions and 18 deletions
  1. +53
    -18
      src/Discord.Net.WebSocket/Entities/Channels/SocketNewsChannel.cs

+ 53
- 18
src/Discord.Net.WebSocket/Entities/Channels/SocketNewsChannel.cs View File

@@ -9,6 +9,11 @@ namespace Discord.WebSocket
/// <summary>
/// Represents a WebSocket-based news channel in a guild that has the same properties as a <see cref="SocketTextChannel"/>.
/// </summary>
/// <remarks>
/// <note type="warning">
/// Most of the properties and methods featured may not be supported due to the nature of the channel.
/// </note>
/// </remarks>
[DebuggerDisplay(@"{DebuggerDisplay,nq}")]
public class SocketNewsChannel : SocketTextChannel
{
@@ -22,31 +27,61 @@ namespace Discord.WebSocket
entity.Update(state, model);
return entity;
}
/// <inheritdoc />
/// <remarks>
/// <note type="important">
/// This property is not supported by this type. Attempting to use this property will result in a <see cref="NotSupportedException"/>.
/// </note>
/// </remarks>
public override int SlowModeInterval
{
get { throw new NotSupportedException("News channels do not support Slow Mode."); }
}
=> throw new NotSupportedException("News channels do not support Slow Mode.");
/// <inheritdoc />
/// <remarks>
/// <note type="important">
/// This method is not supported by this type. Attempting to use this method will result in a <see cref="NotSupportedException"/>.
/// </note>
/// </remarks>
public override Task AddPermissionOverwriteAsync(IRole role, OverwritePermissions permissions, RequestOptions options = null)
{
throw new NotSupportedException("News channels do not support Overwrite Permissions.");
}
=> throw new NotSupportedException("News channels do not support Overwrite Permissions.");
/// <inheritdoc />
/// <remarks>
/// <note type="important">
/// This method is not supported by this type. Attempting to use this method will result in a <see cref="NotSupportedException"/>.
/// </note>
/// </remarks>
public override Task AddPermissionOverwriteAsync(IUser user, OverwritePermissions permissions, RequestOptions options = null)
{
throw new NotSupportedException("News channels do not support Overwrite Permissions.");
}
=> throw new NotSupportedException("News channels do not support Overwrite Permissions.");
/// <inheritdoc />
/// <remarks>
/// <note type="important">
/// This property is not supported by this type. Attempting to use this property will result in a <see cref="NotSupportedException"/>.
/// </note>
/// </remarks>
public override IReadOnlyCollection<Overwrite> PermissionOverwrites
=> throw new NotSupportedException("News channels do not support Overwrite Permissions.");
/// <inheritdoc />
/// <remarks>
/// <note type="important">
/// This method is not supported by this type. Attempting to use this method will result in a <see cref="NotSupportedException"/>.
/// </note>
/// </remarks>
public override Task SyncPermissionsAsync(RequestOptions options = null)
{
throw new NotSupportedException("News channels do not support Overwrite Permissions.");
}
=> throw new NotSupportedException("News channels do not support Overwrite Permissions.");
/// <inheritdoc />
/// <remarks>
/// <note type="important">
/// This method is not supported by this type. Attempting to use this method will result in a <see cref="NotSupportedException"/>.
/// </note>
/// </remarks>
public override Task RemovePermissionOverwriteAsync(IRole role, RequestOptions options = null)
{
throw new NotSupportedException("News channels do not support Overwrite Permissions.");
}
=> throw new NotSupportedException("News channels do not support Overwrite Permissions.");
/// <inheritdoc />
/// <remarks>
/// <note type="important">
/// This method is not supported by this type. Attempting to use this method will result in a <see cref="NotSupportedException"/>.
/// </note>
/// </remarks>
public override Task RemovePermissionOverwriteAsync(IUser user, RequestOptions options = null)
{
throw new NotSupportedException("News channels do not support Overwrite Permissions.");
}
=> throw new NotSupportedException("News channels do not support Overwrite Permissions.");
}
}

Loading…
Cancel
Save