#๐Ÿ”’ Dex error

38 messages ยท Page 1 of 1 (latest)

near cedarBOT
#

@hazy garden

Python help channel opened

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.

hazy garden
#

can anyone please help me fix this config python file as its cauing the command to now show up on discord

teal cobalt
#

your indentation is in correct in the first screenshot.

@app_commands.command()
    @app_commands.describe(channel="The new text channel to set.")
    async def channel(
        self,
        interaction: discord.Interaction,
        channel: discord.TextChannel,
    ):
hazy garden
#

the command now shows up but can u help me with the part so the command checks the number off users in the server and only works if u have 15 more moe

#
    if len(guild.members) < 15:
        await interaction.response.send_message(
            "This server must have at least 15 members to set a new channel."```
teal cobalt
#

i am not too familiar with Dex, or what this is. I can help you debug the issues if you give me a little more context

hazy garden
#

its not dex related

#

it would be something like this

#

it doesnt work in the current code i have rn

teal cobalt
#

so it is working regardless of member count?

hazy garden
#

yeah

#

but i need to fix it so it wont work the command unless the number off members

teal cobalt
#

can you try printing the value of guild.member_count at line 49

hazy garden
#

i have nothing on line 49

teal cobalt
#

i am aking you to add print(guild.member_count) on line 49 to see the value for it

hazy garden
#

okay

hazy garden
#

i appreciate your help so much

teal cobalt
#

anytime

#

what was the issue?

hazy garden
teal cobalt
#

I don't think adding that fixed the issue but okay

hazy garden
#

cause it wasnt working before i tried earlier

teal cobalt
#

i think it will work even if you remove it now. problem lies somewhere else.

#

but you can ping me if you need any other help

#

have a good one

#

!

hazy garden
#

okay bro

#

take care

near cedarBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, 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.