#Help with Invalid Form Body

1 messages · Page 1 of 1 (latest)

pastel pond
#

When running bot i get error

In 10: Application command names must be unique```

I know for SURE that the command name is unique. i thaught it might be that the maxiumum amount of debug server commands might have been reached so i set it to `None` but it still has the same error. heres the command were tring to add in its most simple form ```py
        @BaseCog.cslash_command(
            description="Set up a voice role",
            guild_ids=servers
        )
        async def vcrole(
                self,
                ctx: ApplicationContext
        ):
            await ctx.respond(f"e")
#

when i do print(servers) it for sure returns None

latent badge
#

what is BaseCog.cslash_command? looks like you have a typo here

latent badge
#

@pastel pond

pastel pond
#

its a custom decorator

latent badge
#

but why

pastel pond
#

someone else made it its an open source bot

#

but all the other ones work

latent badge
#

so you're not using pycord? I'm confused

pastel pond
#

we are

#

lemme send the custom decorater

#
    @staticmethod
    def cslash_command(**kwargs):
        def decorator(func:Callable):
            return (slash_command(**kwargs))(guild_only()(func))
        return decorator
latent badge
#

why not just use @slash_command

pastel pond
#

for better error handling ig and role checks

#
    @staticmethod
    def check_perms(ctx: ApplicationContext, perms:dict, user2: Member=None, bot_force:bool=False):

        if user2 and user2.bot and (not bot_force):
            return False

        permissions = ctx.channel.permissions_for(ctx.author)  # type: ignore
        guild = ctx.guild
        bot = guild.me if guild is not None else ctx.bot.user
        permissions_bot = ctx.channel.permissions_for(bot)

        missing = BaseCog.perm_loop(perms, permissions)
        missing_bot = BaseCog.perm_loop(perms, permissions_bot)

        if missing or missing_bot:
            return False

        if user2 is not None:
            if ctx.author.top_role.position <= user2.top_role.position:
                return False

        return True```
#

idk its an open source bot and someone just made this

mortal stratus
#

Why don't you code a bot by yourself and learn from it.

pastel pond
#

im contributing to an open souce bot

latent badge
#

can you send the source of the bot then?

pastel pond
#

heres my fork

latent badge
#

We couldn’t find any code matching 'cslash_command' in Venox-Network/venox

latent badge
#

nvm I forgot it only searches the default branch

pastel pond
#

oh yea

#

the decorator works fine but the problem is it says invalid body form

#

so is there a limit of commands of commands with debug servers

latent badge
#

there's a limit of commands yes

#

I believe it's 50

pastel pond
#

ok ill count

#

there should only be like 30

#

is there a limit of how many cogs u can load