#Counting system isnt working
1 messages · Page 1 of 1 (latest)
I don’t have a lot of experience with databases, but I assume you defined an entry to have 4 values, guildID channelID number and lastuserID
so you should pass 4 values or create a default value for lastuserID
Idk, like I said don’t have a lot of experience
I just know how to break them 😅
You never defined it, there is no variable lastuser
Read your error messages
Msg is not defined
But still, msg is not defined
msg = …
you just need an lastuserid, correct?
Use -1 for initialization or something
Replace this with msg.author.id and try
but that's not a good way to initialize something
a default value like -1 or something
No?
of course
interaction.user.id will always give the user id without fail
And if it doesnt it's a pycord error
I never said it would fail, it's just not a good way for initializing a database
I suggest -1
from the context I assume you’re writing a counting bot (or feature)
lastuserID will be the person who counted the last number.
Since everyone should be able to start, -1 will not match any discord user id, interaction.user.id on the other hand would restrict the person who used the command for initialization to start the first count.