#π Need help with / commands
79 messages Β· Page 1 of 1 (latest)
@amber compass
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.
can you please send me a block so i can update the codeπ
don't print your exceptions either
and do you have a traceback?
also why are you clearing the commands before syncing them? what's the point?
i dont think so
yea i get it
and also if i wanted to add new slash commands for e.g. /ban it wont appear here
you shouldn't need a /ban command because discord has their own
nothing in terminal?
yes but im trying to make one for a bot which will be planned to use in other servers that request this command
you're on PC right?
yep
it's already a part of discord so there's no need
hit Ctrl and R on your keyboard
i did
!paste - show me your whole code
If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.
why do you have logging but you still print stuff?
oh i forgot i had that
and why is the logging level at DEBUG? you're gonna get loads of debug messages from dpy saying irrelevant things (more verbose output)
and also why use the discord logger instead of your own?
idk easier for me ig
you never use the logger?
also 
comment out the removing commands line
i'm pretty sure it's removing all the commands and then syncing nothing
in fact, save .sync() to a variable and print the length of it
okay so i worte a new code and it still doesnt seem to work
i dont really know what to do
"replace this with the actual ID"
which i have done
OH
and also synced = await ___.sync() then print([cmd.name for cmd in synced])

do you know about discord.py commands
and where did you find this code
not really i havent been coding long but ive tried researching
chat gpt bc i was stuck on the slash commands for like 2 to 3 days
welp
that explains why the code looks horrible
thank you
lemme get ready for the morning then i'll pop back in
yea no worries
probably didn't enable it in your intents then
so ive also came back from a quick cardio session
anyway what i tried doing is clearing the commands from the bot because i imagined the only reason the commands wernt working were because they were old
what i have gotten from ternminal
i genuinely cant figure this problem with these commands
you refresh the commands by syncing them normally, not removing them
If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.
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.