Status not showing up
See original GitHub issueHi! I’m trying to make a self-bot that sets a custom status and then stays online forever. I tried this:
import discum
bot = discum.Client(token="token")
bot.setStatus("my custom status")
bot.gateway.run(auto_reconnect=True)
The bot stays online, but the status doesn’t show up when I check from another account. What am I doing wrong? Cheers!
arandomnewaccount:
oh I think see what’s happening.
What I think is going on here is the IDENTIFY message your client is sending out (when running bot.gateway.run() says to discord that your status is online (https://github.com/Merubokkusu/Discord-S.C.U.M/blob/master/discum/gateway/gateway.py#L64), which is then changing your status. I’m going to have to do a few more tests to confirm, and if that’s indeed the case, then I’ll be fixing it in an upcoming commit.
If that’s the case, then the custom status should show if you don’t connect to the gateway…
edit: just tested it and the gateway connection does not affect the status so… My other guess is that your other account is not getting updates for your current account’s presence changes. See if the profile of your current account (viewed from your other account) shows the custom status (right-click on username -> click profile). If it does, then everything is working fine.
2nd edit: I see now. Tried looking from my other account and couldn’t see any evidence of status-changing on my main so…I’ve got 1 last idea and if that doesn’t work idk (I’ll have to try tmr since tonight I don’t have much time). Thanks for bringing this issue up.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (7 by maintainers)

Top Related StackOverflow Question
Ah I see! Thank you for looking into this. Do you happen to know if there is also a gateway request for sending DMs or something like that? Because after I send 2 DMs with the HTTP request my accounts get locked (even though I use a 1 minute delay between messages and a phone-verified account).
arandomnewaccount: hm well. Technically, but not in the same way that setStatus requires a gateway request. You see, when a real user sends a dm, that user has to go to the channel first (a gateway request) and then send the dm (an http request). Now, there’re a number of ways to code this. The simplest looking way is like this:
You could also set something up so that the request to view the channel is only sent once. Pretty sure that would work too. As far as creating DMs goes, the order is: (1) send the createDM (http request) and then (2) request to view the channel and finally (3) send the messages.
I guess if you don’t want to send the first dm to start it off (as in the example above), you can use threading. Unfortunately, the threading option would probs take a few more lines to implement. But, it’s not too bad; I’d use
threading.Timer(...)for the waiting since a while loop could pose some issues.p.s. for joining guilds, there’s a similar thing going on. Just gotta (1) join guild thru http request and then (2) view the guild using
bot.gateway.request.lazyGuild("guild id here", {"channel id here": [0,99]}).Whew that’s quite a bit actually lol. I should probs document this but uh…Ill get there eventually…
arandomnewaccount: alright made some updates (you’ll have to reinstall discum), here’s how it can be done:
I’ll update the docs later.
But anyway it’s still working so I’m gonna close the issue for now 🤷