Skip to content

Global Slash Commands do not work if there are Permission Checks attached. #999

Closed
@1337Syntax

Description

Summary

The global slash command with permissions attached are greyed-out even though I pass the check.

Reproduction Steps

Following the instructions in the example, use any of the @permissions (make sure you would pass that check) on a global slash command. Then go into Discord and search for the slash command, it will then appear greyed-out eventhough you pass that check.

Minimal Reproducible Code

@slash_command(
    name="test",
    description="testing owner slash commands",
    default_permission=False
)
@permissions.is_owner()
async def test(ctx: discord.ApplicationContext):
    await ctx.respond("it works")

Expected Results

The command should work or at least not show up as greyed-out.

Actual Results

The command is greyed-out.

Intents

ALL

System Information

- Python v3.8.6-final
- py-cord v2.0.0-beta
    - py-cord pkg_resources: v2.0.0b4
- aiohttp v3.6.3
- system info: Windows 10 10.0.19041

Checklist

  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my token from display, if visible.

Additional Context

The permission checks work if I supply guild_ids however I need it to be a global command.

Metadata

Assignees

No one assigned

    Labels

    unconfirmed bugA bug report that needs triaging

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions