Browse Source

Remove obsolete methods and properties

pull/1849/head
Paulo 4 years ago
parent
commit
ed484f7a15
12 changed files with 0 additions and 55 deletions
  1. +0
    -15
      src/Discord.Net.Core/Entities/Guilds/IGuild.cs
  2. +0
    -8
      src/Discord.Net.Core/Entities/Invites/IInviteMetadata.cs
  3. +0
    -5
      src/Discord.Net.Core/Entities/Permissions/ChannelPermission.cs
  4. +0
    -3
      src/Discord.Net.Core/Entities/Permissions/ChannelPermissions.cs
  5. +0
    -2
      src/Discord.Net.Core/Entities/Permissions/GuildPermission.cs
  6. +0
    -3
      src/Discord.Net.Core/Entities/Permissions/GuildPermissions.cs
  7. +0
    -3
      src/Discord.Net.Core/Entities/Permissions/OverwritePermissions.cs
  8. +0
    -6
      src/Discord.Net.Core/Entities/Users/UserProperties.cs
  9. +0
    -2
      src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs
  10. +0
    -3
      src/Discord.Net.Rest/Entities/Invites/RestInviteMetadata.cs
  11. +0
    -2
      src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs
  12. +0
    -3
      src/Discord.Net.WebSocket/Entities/Invites/SocketInvite.cs

+ 0
- 15
src/Discord.Net.Core/Entities/Guilds/IGuild.cs View File

@@ -132,21 +132,6 @@ namespace Discord
/// </returns>
ulong? AFKChannelId { get; }
/// <summary>
/// Gets the ID of the default channel for this guild.
/// </summary>
/// <remarks>
/// This property retrieves the snowflake identifier of the first viewable text channel for this guild.
/// <note type="warning">
/// This channel does not guarantee the user can send message to it, as it only looks for the first viewable
/// text channel.
/// </note>
/// </remarks>
/// <returns>
/// A <see langword="ulong"/> representing the snowflake identifier of the default text channel; <c>0</c> if
/// none can be found.
/// </returns>
ulong DefaultChannelId { get; }
/// <summary>
/// Gets the ID of the widget embed channel of this guild.
/// </summary>
/// <returns>


+ 0
- 8
src/Discord.Net.Core/Entities/Invites/IInviteMetadata.cs View File

@@ -16,14 +16,6 @@ namespace Discord
/// </returns>
bool IsTemporary { get; }
/// <summary>
/// Gets a value that indicates whether the invite has been revoked.
/// </summary>
/// <returns>
/// <c>true</c> if this invite was revoked; otherwise <c>false</c>.
/// </returns>
[Obsolete("This property doesn't exist anymore and shouldn't be used.")]
bool IsRevoked { get; }
/// <summary>
/// Gets the time (in seconds) until the invite expires.
/// </summary>
/// <returns>


+ 0
- 5
src/Discord.Net.Core/Entities/Permissions/ChannelPermission.cs View File

@@ -22,11 +22,6 @@ namespace Discord
/// </summary>
AddReactions = 0x00_00_00_40,
/// <summary>
/// Allows for reading of messages. This flag is obsolete, use <see cref = "ViewChannel" /> instead.
/// </summary>
[Obsolete("Use ViewChannel instead.")]
ReadMessages = ViewChannel,
/// <summary>
/// Allows guild members to view a channel, which includes reading messages in text channels.
/// </summary>
ViewChannel = 0x00_00_04_00,


+ 0
- 3
src/Discord.Net.Core/Entities/Permissions/ChannelPermissions.cs View File

@@ -45,9 +45,6 @@ namespace Discord

/// <summary> If <c>true</c>, a user may add reactions. </summary>
public bool AddReactions => Permissions.GetValue(RawValue, ChannelPermission.AddReactions);
/// <summary> If <c>true</c>, a user may join channels. </summary>
[Obsolete("Use ViewChannel instead.")]
public bool ReadMessages => ViewChannel;
/// <summary> If <c>true</c>, a user may view channels. </summary>
public bool ViewChannel => Permissions.GetValue(RawValue, ChannelPermission.ViewChannel);



+ 0
- 2
src/Discord.Net.Core/Entities/Permissions/GuildPermission.cs View File

@@ -65,8 +65,6 @@ namespace Discord
/// Allows for viewing of audit logs.
/// </summary>
ViewAuditLog = 0x00_00_00_80,
[Obsolete("Use ViewChannel instead.")]
ReadMessages = ViewChannel,
ViewChannel = 0x00_00_04_00,
SendMessages = 0x00_00_08_00,
/// <summary>


+ 0
- 3
src/Discord.Net.Core/Entities/Permissions/GuildPermissions.cs View File

@@ -37,9 +37,6 @@ namespace Discord
/// <summary> If <c>true</c>, a user may view the guild insights. </summary>
public bool ViewGuildInsights => Permissions.GetValue(RawValue, GuildPermission.ViewGuildInsights);

/// <summary> If True, a user may join channels. </summary>
[Obsolete("Use ViewChannel instead.")]
public bool ReadMessages => ViewChannel;
/// <summary> If True, a user may view channels. </summary>
public bool ViewChannel => Permissions.GetValue(RawValue, GuildPermission.ViewChannel);
/// <summary> If True, a user may send messages. </summary>


+ 0
- 3
src/Discord.Net.Core/Entities/Permissions/OverwritePermissions.cs View File

@@ -43,9 +43,6 @@ namespace Discord
/// <summary> If Allowed, a user may add reactions. </summary>
public PermValue AddReactions => Permissions.GetValue(AllowValue, DenyValue, ChannelPermission.AddReactions);
/// <summary> If Allowed, a user may join channels. </summary>
[Obsolete("Use ViewChannel instead.")]
public PermValue ReadMessages => ViewChannel;
/// <summary> If Allowed, a user may join channels. </summary>
public PermValue ViewChannel => Permissions.GetValue(AllowValue, DenyValue, ChannelPermission.ViewChannel);
/// <summary> If Allowed, a user may send messages. </summary>
public PermValue SendMessages => Permissions.GetValue(AllowValue, DenyValue, ChannelPermission.SendMessages);


+ 0
- 6
src/Discord.Net.Core/Entities/Users/UserProperties.cs View File

@@ -22,12 +22,6 @@ namespace Discord
/// </summary>
HypeSquadEvents = 1 << 2,
/// <summary>
/// Flag given to users who have participated in the bug report program.
/// This flag is obsolete, use <see cref="BugHunterLevel1"/> instead.
/// </summary>
[Obsolete("Use BugHunterLevel1 instead.")]
BugHunter = 1 << 3,
/// <summary>
/// Flag given to users who have participated in the bug report program and are level 1.
/// </summary>
BugHunterLevel1 = 1 << 3,


+ 0
- 2
src/Discord.Net.Rest/Entities/Guilds/RestGuild.cs View File

@@ -95,8 +95,6 @@ namespace Discord.Rest
/// <inheritdoc />
public DateTimeOffset CreatedAt => SnowflakeUtils.FromSnowflake(Id);

[Obsolete("DefaultChannelId is deprecated, use GetDefaultChannelAsync")]
public ulong DefaultChannelId => Id;
/// <inheritdoc />
public string IconUrl => CDN.GetGuildIconUrl(Id, IconId);
/// <inheritdoc />


+ 0
- 3
src/Discord.Net.Rest/Entities/Invites/RestInviteMetadata.cs View File

@@ -8,9 +8,6 @@ namespace Discord.Rest
{
private long _createdAtTicks;

/// <inheritdoc />
[Obsolete("This property doesn't exist anymore and shouldn't be used.")]
public bool IsRevoked { get; private set; }
/// <inheritdoc />
public bool IsTemporary { get; private set; }
/// <inheritdoc />


+ 0
- 2
src/Discord.Net.WebSocket/Entities/Guilds/SocketGuild.cs View File

@@ -1232,8 +1232,6 @@ namespace Discord.WebSocket
/// <inheritdoc />
bool IGuild.Available => true;
/// <inheritdoc />
ulong IGuild.DefaultChannelId => DefaultChannel?.Id ?? 0;
/// <inheritdoc />
ulong? IGuild.EmbedChannelId => EmbedChannelId;
/// <inheritdoc />
ulong? IGuild.WidgetChannelId => WidgetChannelId;


+ 0
- 3
src/Discord.Net.WebSocket/Entities/Invites/SocketInvite.cs View File

@@ -49,9 +49,6 @@ namespace Discord.WebSocket
/// <inheritdoc />
int? IInvite.MemberCount => throw new NotImplementedException();
/// <inheritdoc />
[Obsolete("This property doesn't exist anymore and shouldn't be used.")]
bool IInviteMetadata.IsRevoked => throw new NotImplementedException();
/// <inheritdoc />
public bool IsTemporary { get; private set; }
/// <inheritdoc />
int? IInviteMetadata.MaxAge { get => MaxAge; }


Loading…
Cancel
Save