Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bot activity presence occasionally disappears #834

Closed
queer opened this issue Feb 1, 2019 · 23 comments
Closed

Bot activity presence occasionally disappears #834

queer opened this issue Feb 1, 2019 · 23 comments

Comments

@queer
Copy link
Contributor

queer commented Feb 1, 2019

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
Copy link
Contributor

Does refreshing the client reload the status?

@queer
Copy link
Contributor Author

queer commented Feb 1, 2019

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

@jhgg
Copy link
Member

jhgg commented Feb 3, 2019

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

@jhgg jhgg closed this as completed Feb 3, 2019
@ghost
Copy link

ghost commented Apr 29, 2020

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
Copy link

same here, could someone help?

@MinnDevelopment
Copy link
Contributor

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

@florea326
Copy link

and how can I do that, please help?

@Ayfri
Copy link

Ayfri commented Jun 14, 2020

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

@advaith1
Copy link
Member

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

@florea326
Copy link

yeah i use py

@codedipper
Copy link

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

@InanisOmnia
Copy link

InanisOmnia commented Jul 20, 2020

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
Copy link

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
Copy link

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
Copy link

Sazzo commented Feb 9, 2021

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

@LoneDev6
Copy link

Same thing, discordjs 12

@jimmybrancaccio
Copy link

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

@EtzBetz
Copy link

EtzBetz commented Apr 27, 2021

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

@kawaiiseiba
Copy link

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

@mayankpatibandla
Copy link

discord.js v13.6.0, the issue still persists

@Nitsugua38
Copy link

Nitsugua38 commented Jun 13, 2022

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
Copy link

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
Copy link

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: discordjs/discord.js#10206 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests