pycord
pycord copied to clipboard
SlashCommandGroup not registering
Summary
A Slash Command Group within a Cog isn't registering with a fresh install of 2.0.0
Reproduction Steps
To confirm that it's PyCord v.2.0.0, we reverted back to 2.0.0rc1 and the commands reappeared in Discord.
Minimal Reproducible Code
class Profiles(Cog):
def __init__(self, bot: FroggeBot):
self.bot: FroggeBot = bot
######################################################################
profiles = SlashCommandGroup(
name="profiles",
description="Commands for profile creation."
)
######################################################################
@profiles.command(
name="preview",
description="View your current Profile, About Me, or Preferences."
)
async def profile_preview(self, ctx: ApplicationContext) -> None:
# Get the current user's profile.
profile = await get_profile(ctx)
# Make the prompt and view, then send and wait.
prompt = make_embed(
colour=random_all(),
title="Profile Preview",
description=(
"Select from the buttons below to preview the corresponding "
"profile element.\n\n"
"*(Note: Preferences will be disabled unless your job is considered "
"NSFW.)*"
),
timestamp=False
)
view = Pre_View_haha(user=ctx.user, profile_obj=profile)
inter = await ctx.respond(embed=prompt, view=view)
await view.wait()
# Timed out.
if not view.complete:
await view_timeout(inter)
else:
await clean_up(inter)
Expected Results
The slash command should register with Discord and appear in all servers.
Actual Results
The command did not register, even when specifying a guild id.
Intents
All
System Information
- Python v3.10.4-final
- py-cord v2.0.0-final
- aiohttp v3.7.4.post0
- system info: Windows 10 10.0.22000
Checklist
- [X] I have searched the open issues for duplicates.
- [X] I have shown the entire traceback, if possible.
- [X] I have removed my token from display, if visible.
Additional Context
See the related help topic here: https://discord.com/channels/881207955029110855/999357812801019904
Are you still getting this error on the latest commit?
Have the same problem with tha latest master