#๐ bot python
120 messages ยท Page 1 of 1 (latest)
@placid drum
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.
show the full code pls
Click here to see this code in our pastebin.
pls do ^^
The problem I believe is in async with self.bot.db.cursor() as cursor:
You need to first connect to a datatbase like async with aiosqlite.connect() as db
wdym?
It's a typo:
async def create_ticket(seld, button: nextcord.ui.Button, interaction: nextcord.Interaction):
for line 78 ?
Do you see where you went wrong?
no
You put seld instead of self
^^ this is the error
What I gave you was an example, you need to connect to a database
why in the tutorial async with self.bot.db.cursor() as cursor: it works
async with aiosqlite.connect("example.db") as db:
what tut?
yeah tut
where did you get the tutorial from?
Hey!
Thanks for watching today's video, I hope you enjoyed and joined my discorddd... also thanks for 2.6K subscribers!!
LINKS -
Join my Discord - https://discord.gg/twHW4UUJGq
Learn Bot Dev - https://youtu.be/e9SYmj1QF8I
Learn Buttons - https://www.youtube.com/watch?v=y3TqSUSOprs
Thanks if you read all of this and I ho...
this
look
5:50
@vivid nest ?
This video has I'm pretty sure many not recommended stuff, so in conclusion, don't folow videos :)
wow im really stupid
Also, I just realised db was defined in on_ready, so yes you can follow him
Its either this or the other one
and how do I evolve?
read actual docs and ask help here
Follow proper docs
pls link
A hands-on guide to Discord.py
thks
this is using nextcord tho (I'm not sure how different it is)
me neither
you're putting seld
replace seld.db.cursor() with self.db.cursor()
-seld.db.cursor()
+self.db.cursor()
That's what I did, but it doesn't work.
what's the error?
show the code at line 78 pls
can you show all of your code please?
.
That's not the latest
In here you put async(seld
Show your latest please
Change it to async(self...)
dosent work
what's the error then
๐ญ
Show your latest code please
Click here to see this code in our pastebin.
Can you click here please โ๏ธ @placid drum ?
it's up to you to click
Change these two to self please
In a class, you always have to put self first
not really...
You can use anything in the first param
it's not args?
!e
class Dog:
def __init__(bla, name):
bla.name = name
fido = Dog("Fido")
print(fido.name)
:white_check_mark: Your 3.12 eval job has completed with return code 0.
Fido
The thing is, it has to be consistent
?
and for this ?
oh, alr
Did you change both to self?
?
terrible tut
Tuts don't explain anything
Do you understand from the screenshots?
no
There's no self
just bot.db.cursor()
Looks like you didn't follow the tutorial properly
So what do I do?
learn it properly
actually understand what you are doing before moving onto stuff like that
best thing i can think of is to actually learn python.
okay
their site is incomprehensible
The site is perfectly fine and layouts all the documentation neatly and organised.
I recommend that you take a look at the introduction and quickstart-guide.
Can you help me with a point system please?
No. You need to learn by doing. Learn the basics and core concepts of python and Nextcord and build on them.
okay
I don't understand how I can create orders with this.
you won't be able to create anything that functions well without understanding the fundamentals
you should start by just getting the hang out of python before starting to use these third party libraries
sure
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.