discord / discord-api-docs

Official Discord API Documentation
https://discord.com/developers/docs/intro
Other
5.95k stars 1.26k forks source link

Bot activity presence occasionally disappears #834

Closed queer closed 5 years ago

queer commented 5 years ago

Unsure how to describe it better in the title. Occasionally, a bot's activity ("playing XXX") will disappear; I'm not sure how to repro (if we even could on our end). I'm assuming it's something related to handoff between session servers not working right (like with the previous bug where dispatches would no longer fire), but obviously I can't know for sure. I'll see if I can get some debug traces in the next few days if it'd help. Not sure if I would be able to, in no small part just because this issue doesn't manifest very often it seems.

SinisterRectus commented 5 years ago

Does refreshing the client reload the status?

queer commented 5 years ago

No, hence thinking it's a server-side issue

jhgg commented 5 years ago

This is a known bug when we deploy code on the backend.

ghost commented 4 years ago

I know this is old and all, but I'm facing the same issue. I left my bot running overnight and the next day the activity presence disappeared.

florea326 commented 4 years ago

same here, could someone help?

MinnDevelopment commented 4 years ago

You can simply send the same presence again in some interval. That will ensure your presence doesn't get removed permanently.

florea326 commented 4 years ago

and how can I do that, please help?

Ayfri commented 4 years ago

@Noemai this is not what they are asking for, they are asking for a JDA way.

advaith1 commented 4 years ago

They never mentioned what lib, but lib support should be in the lib's server, not here

florea326 commented 4 years ago

yeah i use py

codedipper commented 4 years ago

I am also having this issue, with v12.2.0 of discord.js.

InanisOmnia commented 4 years ago

Bot Activity disappears

I don't think it is acceptable to have to refresh the activity on a regular basis, it should be that the bot will retain its activity setting it once (just like a custom status for users it will remain until changed)

This is an issue with the library or how discord operates with bots and should be changed

I retract this statement

karelkryda commented 3 years ago

Bot Activity disappears

I don't think it is acceptable to have to refresh the activity on a regular basis, it should be that the bot will retain its activity setting it once (just like a custom status for users it will remain until changed)

This is an issue with the library or how discord operates with bots and should be changed

I agree

DevItsMB commented 3 years ago

I still have that issue, I just discoverd this thread and I thought I was the only one but I was wrong. It is actually annoying that you have to restart the bot with a command or via cmd to get the presence back.

Sazzo commented 3 years ago

Having the same problem here, it's a little annoying to be honest.

LoneDev6 commented 3 years ago

Same thing, discordjs 12

jimmybrancaccio commented 3 years ago

Just chiming in as the same thing has been happening to me as well for a while.

EtzBetz commented 3 years ago

I'm obviously affected by this bug as well, I think that this shouldn't happen.

kawaiiseiba commented 2 years ago

discord.js v13.4.0 and I'm also having the same issue.

mayankpatibandla commented 2 years ago

discord.js v13.6.0, the issue still persists

Nitsugua38 commented 2 years ago

I still have that issue, I just discoverd this thread and I thought I was the only one but I was wrong. It is actually annoying that you have to restart the bot with a command or via cmd to get the presence back.

The issue is still here sometimes. Anyway, if you don’t wanna restart your bot to set his status : add a command to your bot that only you can execute (it checks your ID) to set the presence again.

JstnMcBrd commented 7 months ago

I am also interested in this problem being fixed. Commenting to add myself to the thread so I receive future notifications.

I've worked around this problem by having the user activity be refreshed regularly, but it's far from ideal.

JstnMcBrd commented 6 months ago

For anyone else who runs into this problem with discord.js, I was able to fix it by setting the client's activity in the client constructor, instead of setting it later.

const activityOptions: ActivityOptions = { ... };
const client = new Client({
    presence: {
        activities: [activityOptions],
    },
    ...
};

It's been a couple weeks since I implemented this, and I haven't needed to refresh the activity at all.

This solution was suggested here: https://github.com/discordjs/discord.js/issues/10206#issuecomment-2041084898