Ask coding questions

← Back to all posts
Discord.py bot problem with user status
dacoconutnut (1)

Look at approximately line 163, !members command. In this command I print all server members in an embed. I am using stat2Str dictionary to convert discord.Status.blabla to a string with text that will be outputed.

As you can see, the bot outputs nothing in the embed instead of "x Offline / Invisible" if the status is invis or offline, while it outputs everything normally in the console. I tried to change text instead of "x Offline / Invisible", the situation did not change(it was censored there by me, not a repl issue).

Help please, maybe i am just dumb, i dunno

Answered by AntimatterDev (33) [earned 5 cycles]
View Answer
Comments
hotnewtop
AntimatterDev (33)

maybe have it as a diff because all the rest that are working are diff's?

dacoconutnut (1)

@AntimatterDev I dunno, I will google if diff has suitable syntax highliting

AntimatterDev (33)

@dacoconutnut ok idk what this means as i haven't messed around with embedded too much using stuff like you are doing.i normally keep it simple with my embedded's but you are doing some next level stuff that's too big brain for my small brain.

dacoconutnut (1)

@AntimatterDev I enabled this piece of code:

this is the result

Apparently, everything works

AntimatterDev (33)

@dacoconutnut so it should work for the offline thing your were trying to do?

AntimatterDev (33)

idk i just use discord.py's color stuff it comes with

AntimatterDev (33)

@dacoconutnut thats simple? i dont want to see what you think is complex. i thought my bot ignus was complicated

dacoconutnut (1)

@AntimatterDev what`s the link to its repl?

AntimatterDev (33)

@dacoconutnut its not quite done yet but i can send u a link to my first discord bot whos name is Gaybot. Its a piece of junk but somehow its made it into 42 different servers.

dacoconutnut (1)

@AntimatterDev I see our bots are both complicated in some way. What is your discord? I want to have contact with you

AntimatterDev (33)

ill accept the request when i get home if you actually do decide to contact me. i'm currently in school. -_-

dacoconutnut (1)

@AntimatterDev It turns out i am just stupid. If there are no activities(and this turns out is the case for offline/invis status bc activities are hidden) "No activites" is set to the description, not added. So, it clears the offline status text and just shows "No activites".

AntimatterDev (33)

ill run your code on one of my bots and try and fix it if u want?