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

defaultMemberPermissions does not work on Subcommand but is typed #934

Closed
beuluis opened this issue Oct 9, 2023 · 4 comments
Closed

defaultMemberPermissions does not work on Subcommand but is typed #934

beuluis opened this issue Oct 9, 2023 · 4 comments
Labels
bug Something isn't working need repro wontfix This will not be worked on

Comments

@beuluis
Copy link

beuluis commented Oct 9, 2023

Issue description

defaultMemberPermissions is allowed as configuration option for the @subcommand decorator, but does nothing when set.

Code sample

import {
    PermissionFlagsBits,
} from 'discord.js';
import {
    Context,
    SlashCommandContext,
    Subcommand,
} from 'necord';

@Subcommand({
        name: 'command',
        description: 'Bla',
        defaultMemberPermissions: [PermissionFlagsBits.Administrator],
    })
    public async onCommand(
        @Context() [interaction]: SlashCommandContext,
    ): Promise<InteractionResponse<boolean>> {
        // func
    }

discord.js version

14.13.0

nest.js version

10.2.7

Node.js version

18.17.1

Operating system

MacOS but running in docker with official alpine node image

Priority this issue should have

Medium (should be fixed soon)

Which partials do you have configured?

No Partials

Which gateway intents are you subscribing to?

GUILDS

@beuluis beuluis added bug Something isn't working need repro labels Oct 9, 2023
@SocketSomeone
Copy link
Member

Fixed at https://github.com/necordjs/necord/releases/tag/v6.1.8

@beuluis
Copy link
Author

beuluis commented Oct 9, 2023

Just a question to confirm:

defaultMemberPermissions can only be used with GroupCommand and SlashCommand right?

Or is there a way to make it work on SubCommand as well?

@SocketSomeone
Copy link
Member

Just a question to confirm:

defaultMemberPermissions can only be used with GroupCommand and SlashCommand right?

Or is there a way to make it work on SubCommand as well?

Only with @SlashCommand and createCommandGroup.

No, it not supported by Discord

Copy link

github-actions bot commented Jan 7, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot added the wontfix This will not be worked on label Jan 7, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working need repro wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants