#AFK Welcome back message isnt appearing

1 messages · Page 1 of 1 (latest)

wraith lance
#

I have an idea but I don't know if it will help you. Write?

#

Use database and when commanding /afk make the value "afk" to 1 which will mean that he is afk and when he writes a message there will be a check for the value 1
and if "afk" is <2(0,1) then he will be given the value 2 which will mean that he is not afk

wraith lance
#

what?

#

?

#

Why?

charred glade
#

Do you have message intents enabled? Have you debugged each line? Which line is it failing on?

"Help" isn't really an explanation as to what is going on?

#

Are you executing this code in an on_message event?

wraith lance
#

Can you tell me how to enclose a guild in a variable?

charred glade
#

Add some print statements to make sure you are getting the right information from the database

wraith lance
#

I need so that I can use the guild as a variable (guild = ???)

charred glade
wraith lance
#

what

charred glade
#

Probably because you are printing before assignment...

wraith lance
#

Why DELETE?

charred glade
#

And you are printing result where the variable is result2

#

Because they are referenced before assignment

#

Basic programming knowledge

#

Ok so the code isn't executing so now you know the problem is before this code

charred glade
wraith lance
hardy plover
#

-warn @wraith lance using help thread of another user for own help request

echo gyroBOT
#

⚠ Warned Флоппа#8491

charred glade
#

Should probably find where the code should be executing but isn't I guess.

Unfortunately clipping random screenshots of code doesn't really help.

My recommendation would be refactoring your code and use cogs. When you are making varieties of variable names like member1, result1, result2 etc it's easy to reference the wrong variable, or overwrite a variable which shouldn't of been etc.

wraith lance
#

So you need to make sure that the command you use the /afk command responds to the next message with an embed or message?