-
import selfcord as discord
# Just using on_message to trigger it. I've heard on_ready isn't stable
@client.event
async def on_message(ctx):
state = "Custom Status"
# Change the game activity
await client.change_presence(activity=discord.Game("Game"),
status=discord.Status.idle)
await asyncio.sleep(3)
# Change the custom status
await client.change_presence(activity=discord.activity.CustomActivity(
state,
emoji="⛏️"
)) When this code gets executed, the game status gets updated, then a few seconds later, disappears and the custom status replaces it. Is there any way to mitigate this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Seems like I'm mixing stuff up with my clients. When the bot logs off, the custom status remains but the game status disappears (as expected). About a few minutes later, the custom status disappeared as well. I assume this is just how Discord caches things? The issue with it overriding happens on and off now Edit: Nope, nevermind. Overwriting |
Beta Was this translation helpful? Give feedback.
-
The way sessions/presences work is very complicated and very stupid. The rebase branch (2.0) will have a commit in the next few days that will pretty much get it working as well as possible. When that's pushed everything should work far better. |
Beta Was this translation helpful? Give feedback.
The way sessions/presences work is very complicated and very stupid.
The rebase branch (2.0) will have a commit in the next few days that will pretty much get it working as well as possible. When that's pushed everything should work far better.