Skip to content

Commit

Permalink
lol fix
Browse files Browse the repository at this point in the history
  • Loading branch information
catplvsplus committed Oct 28, 2023
1 parent d2733a0 commit 616aa45
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,11 @@ export class ContextMenuCommandBuilder extends Mixin(DiscordJsContextMenuCommand

public setRequiredMemberPermissions(permissions: PermissionResolvable|null): this {
const bigint = permissions ? PermissionsBitField.resolve(permissions) : null;
return super.setDefaultMemberPermissions(bigint).setRequiredMemberPermissions(bigint);

this.required_member_permissions = bigint ?? undefined;
Reflect.set(this, 'default_member_permissions', String(bigint));

return this;
}

public toJSON(): RESTPostAPIContextMenuApplicationCommandsJSONBody & ContextMenuCommandBuilderData {
Expand Down
6 changes: 5 additions & 1 deletion packages/core/src/classes/builders/SlashCommandBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@ export class SlashCommandBuilder extends Mixin(DiscordJsSlashCommandBuilder, Bas

public setRequiredMemberPermissions(permissions: PermissionResolvable|null): this {
const bigint = permissions ? PermissionsBitField.resolve(permissions) : null;
return super.setDefaultMemberPermissions(bigint).setRequiredMemberPermissions(bigint);

this.required_member_permissions = bigint ?? undefined;
Reflect.set(this, 'default_member_permissions', String(bigint));

return this;
}

public toJSON(): SlashCommandBuilderData & { type?: ApplicationCommandType.ChatInput; } {
Expand Down

0 comments on commit 616aa45

Please sign in to comment.