Closed AdamJD01 closed 3 months ago
I've just tested this with your exact code on 5.1.0 and had no issues detecting activity start events. Is your bot in the same server as the user you try to detect activity changes of? Has the bot finished loading before you change your activity? Is the user currently online, since activities do not show up for invisible users.
You can test activities by setting a custom status:
Yes to all those questions. Setting a custom status works but if I for example play a game that Discord recognizes and says I'm playing then it does nothing.
Can you check your privacy settings, whether you actually share your activity with others?
User Settings:
Per-Guild Settings:
That was the issue... I had the share your activity status by default setting disabled. Thank you for your help. I feel rather dumb now lol
General Troubleshooting
Version of JDA
5.1.0
Expected Behaviour
I want onUserActivityStart to detect when a user is doing an activity (listening, playing, streaming etc) but it does nothing when my activity status gets updated for testing and doesn't even log a test message. My bot has the privileged intents enabled in the developer portal and the bot has the required permissions set in the server. I have everything enabled in the code just for testing. I've also tested other listeners such as onUserTyping as a sanity check and the other listeners work.
Code Example for Reproduction Steps
Code for JDABuilder or DefaultShardManagerBuilder used
Exception or Error