From 8e1857286d5a9a2033b3ff7eb3bbb68500e46715 Mon Sep 17 00:00:00 2001 From: SpaceEEC Date: Wed, 5 Jun 2019 22:18:01 +0200 Subject: [PATCH] typings(Guild): add typings for setRolePositions See: PR: #3317 Commit: 8bc8ffe168f9bd37a9fb372bd2b47d8be15d9f40 --- src/structures/Guild.js | 2 +- typings/index.d.ts | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/structures/Guild.js b/src/structures/Guild.js index fc0004875..b2adfbc86 100644 --- a/src/structures/Guild.js +++ b/src/structures/Guild.js @@ -994,7 +994,7 @@ class Guild extends Base { /** * The data needed for updating a guild role's position * @typedef {Object} GuildRolePosition - * @property {GuildRoleResolveable} role The ID of the role + * @property {RoleResolveable} role The ID of the role * @property {number} position The position to update */ diff --git a/typings/index.d.ts b/typings/index.d.ts index 7288c015a..7dfe5eed3 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -472,6 +472,7 @@ declare module 'discord.js' { public setName(name: string, reason?: string): Promise; public setOwner(owner: GuildMemberResolvable, reason?: string): Promise; public setRegion(region: string, reason?: string): Promise; + public setRolePositions(rolePositions: RolePosition[]): Promise; public setSplash(splash: Base64Resolvable | null, reason?: string): Promise; public setSystemChannel(systemChannel: ChannelResolvable | null, reason?: string): Promise; public setVerificationLevel(verificationLevel: number, reason?: string): Promise; @@ -2176,6 +2177,11 @@ declare module 'discord.js' { mentionable?: boolean; } + interface RolePosition { + role: RoleResolvable; + position: number; + } + type RoleResolvable = Role | string; type ShardingManagerMode = 'process' | 'worker';