backport(Permissions): backport STREAM permission from #3309 (#3447)

* Backport the STREAM permission

* Update typings and default
This commit is contained in:
Ryan Munro
2019-08-28 19:09:45 +10:00
committed by SpaceEEC
parent 1121b2f7bf
commit dcee09c308
2 changed files with 6 additions and 1 deletions

View File

@@ -208,6 +208,7 @@ class Permissions {
* - `ADD_REACTIONS` (add new reactions to messages)
* - `VIEW_AUDIT_LOG`
* - `PRIORITY_SPEAKER`
* - `STREAM`
* - `VIEW_CHANNEL`
* - `READ_MESSAGES` **(deprecated)**
* - `SEND_MESSAGES`
@@ -244,6 +245,7 @@ Permissions.FLAGS = {
ADD_REACTIONS: 1 << 6,
VIEW_AUDIT_LOG: 1 << 7,
PRIORITY_SPEAKER: 1 << 8,
STREAM: 1 << 9,
VIEW_CHANNEL: 1 << 10,
READ_MESSAGES: 1 << 10,
@@ -282,7 +284,7 @@ Permissions.ALL = Object.keys(Permissions.FLAGS).reduce((all, p) => all | Permis
* Bitfield representing the default permissions for users
* @type {number}
*/
Permissions.DEFAULT = 104324097;
Permissions.DEFAULT = 104324673;
/**
* @class EvaluatedPermissions

3
typings/index.d.ts vendored
View File

@@ -1997,6 +1997,7 @@ declare module 'discord.js' {
ADD_REACTIONS?: number;
VIEW_AUDIT_LOG?: number;
PRIORITY_SPEAKER?: number;
STREAM?: number;
VIEW_CHANNEL?: number;
READ_MESSAGES?: number;
SEND_MESSAGES?: number;
@@ -2032,6 +2033,7 @@ declare module 'discord.js' {
ADD_REACTIONS?: boolean;
VIEW_AUDIT_LOG?: boolean;
PRIORITY_SPEAKER?: boolean;
STREAM?: boolean;
VIEW_CHANNEL?: boolean;
READ_MESSAGES?: boolean;
SEND_MESSAGES?: boolean;
@@ -2066,6 +2068,7 @@ declare module 'discord.js' {
| 'ADD_REACTIONS'
| 'VIEW_AUDIT_LOG'
| 'PRIORITY_SPEAKER'
| 'STREAM'
| 'VIEW_CHANNEL'
| 'READ_MESSAGES'
| 'SEND_MESSAGES'