feat(GuildChannel): make createOverwrite and updateOverwrite not dependent on cache (#5489)

Co-authored-by: SpaceEEC <spaceeec@yahoo.com>
Co-authored-by: Antonio Román <kyradiscord@gmail.com>
This commit is contained in:
Shubham Parihar
2021-05-12 01:53:09 +05:30
committed by GitHub
parent 74e97ef91b
commit 58763b0e91
2 changed files with 33 additions and 17 deletions

9
typings/index.d.ts vendored
View File

@@ -876,7 +876,7 @@ declare module 'discord.js' {
public createOverwrite(
userOrRole: RoleResolvable | UserResolvable,
options: PermissionOverwriteOption,
reason?: string,
overwriteOptions?: GuildChannelOverwriteOptions,
): Promise<this>;
public edit(data: ChannelData, reason?: string): Promise<this>;
public equals(channel: GuildChannel): boolean;
@@ -898,7 +898,7 @@ declare module 'discord.js' {
public updateOverwrite(
userOrRole: RoleResolvable | UserResolvable,
options: PermissionOverwriteOption,
reason?: string,
overwriteOptions?: GuildChannelOverwriteOptions,
): Promise<this>;
public isText(): this is TextChannel | NewsChannel;
}
@@ -2797,6 +2797,11 @@ declare module 'discord.js' {
cache: boolean;
}
interface GuildChannelOverwriteOptions {
reason?: string;
type?: number;
}
interface FetchMemberOptions {
user: UserResolvable;
cache?: boolean;