Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

types(Interaction): Narrow memberPermissions #7054

Merged
merged 1 commit into from
Dec 2, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1227,7 +1227,7 @@ export class Interaction<Cached extends CacheType = CacheType> extends Base {
public type: InteractionType;
public user: User;
public version: number;
public memberPermissions: Readonly<Permissions> | null;
public memberPermissions: CacheTypeReducer<Cached, Readonly<Permissions>>;
public inGuild(): this is Interaction<'present'>;
public inCachedGuild(): this is Interaction<'cached'>;
public inRawGuild(): this is Interaction<'raw'>;
Expand Down Expand Up @@ -1546,7 +1546,9 @@ export class MessageComponentInteraction<Cached extends CacheType = CacheType> e
public static resolveType(type: MessageComponentTypeResolvable): MessageComponentType;
}

export class MessageContextMenuInteraction<Cached extends CacheType = CacheType> extends ContextMenuInteraction<Cached> {
export class MessageContextMenuInteraction<
Cached extends CacheType = CacheType,
> extends ContextMenuInteraction<Cached> {
public readonly targetMessage: CacheTypeReducer<Cached, Message, APIMessage>;
public inGuild(): this is MessageContextMenuInteraction<'present'>;
public inCachedGuild(): this is MessageContextMenuInteraction<'cached'>;
Expand Down