typings(Guild): add typings for setRolePositions

See:
PR: #3317
Commit: 8bc8ffe168
This commit is contained in:
SpaceEEC
2019-06-05 22:18:01 +02:00
parent 8bc8ffe168
commit 8e1857286d
2 changed files with 7 additions and 1 deletions

View File

@@ -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
*/

6
typings/index.d.ts vendored
View File

@@ -472,6 +472,7 @@ declare module 'discord.js' {
public setName(name: string, reason?: string): Promise<Guild>;
public setOwner(owner: GuildMemberResolvable, reason?: string): Promise<Guild>;
public setRegion(region: string, reason?: string): Promise<Guild>;
public setRolePositions(rolePositions: RolePosition[]): Promise<Guild>;
public setSplash(splash: Base64Resolvable | null, reason?: string): Promise<Guild>;
public setSystemChannel(systemChannel: ChannelResolvable | null, reason?: string): Promise<Guild>;
public setVerificationLevel(verificationLevel: number, reason?: string): Promise<Guild>;
@@ -2176,6 +2177,11 @@ declare module 'discord.js' {
mentionable?: boolean;
}
interface RolePosition {
role: RoleResolvable;
position: number;
}
type RoleResolvable = Role | string;
type ShardingManagerMode = 'process' | 'worker';