#🔒 I need help with my code
34 messages · Page 1 of 1 (latest)
@abstract comet
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
you probably want a subcommand. warnings could be the parent command while check is the child command
sorry i am relative new to coding so i do not really understand what you mean.
!d discord.app_commands.Group
class discord.app_commands.Group(*, name=..., description=..., parent=None, guild_ids=None, guild_only=..., allowed_contexts=..., allowed_installs=..., nsfw=..., ...)```
A class that implements an application command group.
These are usually inherited rather than created manually.
Decorators such as [`guild_only()`](https://discordpy.readthedocs.io/en/stable/interactions/api.html#discord.app_commands.guild_only), [`guilds()`](https://discordpy.readthedocs.io/en/stable/interactions/api.html#discord.app_commands.guilds), and [`default_permissions()`](https://discordpy.readthedocs.io/en/stable/interactions/api.html#discord.app_commands.default_permissions) will apply to the group if used on top of a subclass. For example...
make a group called warnings and add a command on it called check
You are making the bot with py right ?
yes
I think you should focus on creating a good bot rather than focusing on name.
But if you want you can add a class called warnings and then add a subcommand named check in it.
@app_commands.command
what
thats not how you make a subcommand
thats how you make a regular command
the / commands work how they should but the names would look stupid ik not many would see it but /warning_check looks bad and /warning check gives me a warning so i asked here but i still do not understand anything
/warning check gives you a warning?
ValueError: 'remove warnings' must be between 1-32 characters and contain only lower-case letters, numbers, hyphens, or underscores.
the name in the code
did you not read what i said?
what did you get confused about?
it's a decorator and a class definition
if these are unfamiliar, you should probably learn more about python before stepping up to something like this
Ye you are right
yes, my bad. I was saying to create a class and then put 2 commands in it like
@warnings.command(name="check")
@commands.group(name="warnings")
It might work

lol, im in trouble 
you can inline it: ```py
timetables = Group(name = "timetable", description = "...")
@timetables.command()
async def show(self, ...):
...
This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.