#๐ Bank, cog and json
16 messages ยท Page 1 of 1 (latest)
@delicate vale
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.
first of all, why are you using @bot.tree.command in a cog
you should be using @app_commands.command
!paste - and show the code causing this issue
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.
Yes that what I saw somewhere. But I really want commands to appear when I write a "/". Any solution? Can't find or simply don't understand maybe
https://paste.pythondiscord.com/WO6A
Don't judge me, there is as many trees in my command as in a forest.
Please don't use json as database
with all due respect, this looks horrible
how do you tell where anything is?
like npty said, you need to change to a SQLite database at the bare minimum
It can almost always trace back to either:
- You stored a version of old dated data that you are using and forget to update it
- You forgot to save the data you updated
- Race conditions in async
Solution:
- Never store any copy of user data in memory persistently unless they are constant, or any change doesn't matter
- Write some cleaner code that makes it obvious to yourself
- Use SQL, maybe with lock
Ah "horrible". So I redo all and... ok. First time coding sorry
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.