Skip to content

Commit

Permalink
Allow number type for permissions over REST
Browse files Browse the repository at this point in the history
  • Loading branch information
abalabahaha committed Apr 4, 2021
1 parent d7c69f2 commit 39dd05f
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -858,7 +858,7 @@ declare namespace Eris {
hoist?: boolean;
mentionable?: boolean;
name?: string;
permissions?: bigint;
permissions?: bigint | number;
}

// Voice
Expand Down Expand Up @@ -1501,8 +1501,8 @@ declare namespace Eris {
editChannelPermission(
channelID: string,
overwriteID: string,
allow: bigint,
deny: bigint,
allow: bigint | number,
deny: bigint | number,
type: string,
reason?: string
): Promise<void>;
Expand Down Expand Up @@ -1963,8 +1963,8 @@ declare namespace Eris {
edit(options: Omit<EditChannelOptions, "icon" | "ownerID">, reason?: string): Promise<this>;
editPermission(
overwriteID: string,
allow: bigint,
deny: bigint,
allow: bigint | number,
deny: bigint | number,
type: PermissionType,
reason?: string
): Promise<PermissionOverwrite>;
Expand Down
2 changes: 1 addition & 1 deletion lib/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -1187,7 +1187,7 @@ class Client extends EventEmitter {
* @arg {Boolean} [options.hoist] Whether to hoist the role in the user list or not
* @arg {Boolean} [options.mentionable] Whether the role is mentionable or not
* @arg {String} [options.name] The name of the role
* @arg {BigInt} [options.permissions] The role permissions number
* @arg {BigInt | Number} [options.permissions] The role permissions number
* @arg {String} [reason] The reason to be displayed in audit logs
* @returns {Promise<Role>}
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/structures/Guild.js
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ class Guild extends Base {
* @arg {Boolean} [options.hoist] Whether to hoist the role in the user list or not
* @arg {Boolean} [options.mentionable] Whether the role is mentionable or not
* @arg {String} [options.name] The name of the role
* @arg {BigInt} [options.permissions] The role permissions number
* @arg {BigInt | Number} [options.permissions] The role permissions number
* @arg {String} [reason] The reason to be displayed in audit logs
* @returns {Promise<Role>}
*/
Expand Down
4 changes: 2 additions & 2 deletions lib/structures/GuildChannel.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ class GuildChannel extends Channel {
/**
* Create a channel permission overwrite
* @arg {String} overwriteID The ID of the overwritten user or role
* @arg {BigInt} allow The permissions number for allowed permissions
* @arg {BigInt} deny The permissions number for denied permissions
* @arg {BigInt | Number} allow The permissions number for allowed permissions
* @arg {BigInt | Number} deny The permissions number for denied permissions
* @arg {String} type The object type of the overwrite, either "member" or "role"
* @arg {String} [reason] The reason to be displayed in audit logs
* @returns {Promise<PermissionOverwrite>}
Expand Down
2 changes: 1 addition & 1 deletion lib/structures/Role.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class Role extends Base {
* @arg {Boolean} [options.hoist] Whether to hoist the role in the user list or not
* @arg {Boolean} [options.mentionable] Whether the role is mentionable or not
* @arg {String} [options.name] The name of the role
* @arg {BigInt} [options.permissions] The role permissions number
* @arg {BigInt | Number} [options.permissions] The role permissions number
* @arg {String} [reason] The reason to be displayed in audit logs
* @returns {Promise<Role>}
*/
Expand Down

0 comments on commit 39dd05f

Please sign in to comment.