Deprecates ReadMessages, introduces ViewChannel (#1033)

* Deprecates ReadMessages, introduces ViewChannel

* Adds period and comma somehow missed
This commit is contained in:
HelpfulStranger999
2018-05-24 19:17:19 -05:00
committed by Christopher F
parent bc6009ec72
commit 5f084adf94
2 changed files with 10 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
using System;
using System;
namespace Discord
{
@@ -16,7 +16,9 @@ namespace Discord
// Text
AddReactions = 0x00_00_00_40,
ViewAuditLog = 0x00_00_00_80,
ReadMessages = 0x00_00_04_00,
[Obsolete("Use ViewChannel instead.")]
ReadMessages = ViewChannel,
ViewChannel = 0x00_00_04_00,
SendMessages = 0x00_00_08_00,
SendTTSMessages = 0x00_00_10_00,
ManageMessages = 0x00_00_20_00,

View File

@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.Diagnostics;
namespace Discord
@@ -35,7 +36,10 @@ namespace Discord
public bool ViewAuditLog => Permissions.GetValue(RawValue, GuildPermission.ViewAuditLog);
/// <summary> If True, a user may join channels. </summary>
public bool ReadMessages => Permissions.GetValue(RawValue, GuildPermission.ReadMessages);
[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>
public bool SendMessages => Permissions.GetValue(RawValue, GuildPermission.SendMessages);
/// <summary> If True, a user may send text-to-speech messages. </summary>