I have a (hopefully) simple question about a boolean function. I am trying to set up a simple auto replier, but for some reason it returns no errors but just does not work. I am not sure why, it seems like it's not registering that I have set afk to equal True. I'm stuck. Any help?
afk = False #set to default as False
if Status == 'SENT' or (Status == 'RECEIVED'):
if Message.Body.lower() == '!afk on':
afk = True #set "on"
Message.Chat.SendMessage("AFK ON")
elif Message.Body.lower() == '!afk off':
afk = False #turn off
Message.Chat.SendMessage("AFK OFF")
if afk == True and (Status == 'SENT' or Status == 'RECEIVED'): #if its true AND in a message
if 'myname' in Message.Body.lower():
Message.Chat.SendMessage("I'm not here. Be back soon!")