Bot statuses disappear after a short while
Hey everyone, does anyone by chance know why my bot stops displaying its statuses all together? My statuses are defined in a statuses.js file. Here is my index.js file:
7 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!Its a Discord thing, cant really be helped
Is that so? What exactly is the "discord" thing and how can it be fixed in any way?
That presences stop being set if you keep setting them all the time
They kinda time out
The fix is not to have them rotate, and set the presence on login
So you're saying its impossible to filter through presences and I would need to stick to one?
Someone else might know a fix, but otherwise yeah kinda
Activities and statuses not working after long uptime is a known issue with Discord
Unfortunate
well, it works (atleast so far) but it takes some time for the statuses to kick in (i wanna say 20ish min before the first status) and then it works fine!
could you show me how i would implement this? my code is above and my statuses are in a
statuses.js
file.
require('dotenv').config();
const { ActivityType } = require('discord.js');
//TOTAL: 20 STATUSES (4 ACTIVITIES * 5 NAMES)
var statuses = [
//PLAYING
{ name: "with my phone ๐ฑ", type: ActivityType.Playing },
{ name: "negotiator with my alarm clock โฐ", type: ActivityType.Playing },
{ name: "musical chairs with study spots ๐ช", type: ActivityType.Playing },
{ name: "DJ with my study playlists ๐ง", type: ActivityType.Playing },
{ name: "chef with 2 AM microwave ramen ๐", type: ActivityType.Playing },
//WATCHING
{ name: "Khan Academy ๐ฑ", type: ActivityType.Watching },
{ name: "The Organic Chemistry Tutor ๐งช", type: ActivityType.Watching },
{ name: "paint dry on the wall ๐ค", type: ActivityType.Watching },
{ name: "the stars for a sign that I'll pass โจ", type: ActivityType.Watching },
{ name: "the Wi-Fi signal perform a vanishing act ๐", type: ActivityType.Watching },
//LISTENING
{ name: "the symphony of the mouse clicks ๐ฑ๏ธ", type: ActivityType.Listening },
{ name: "the echo of unchecked notifications ๐", type: ActivityType.Listening },
{ name: "my delusions ๐ฎ", type: ActivityType.Listening },
{ name: "the clock ticking ๐", type: ActivityType.Listening },
{ name: "the new album ๐ถ", type: ActivityType.Listening },
//COMPETING
{ name: "the autocorrect spelling bee ๐", type: ActivityType.Competing },
{ name: "drinking the very last drop of study boba ๐ง", type: ActivityType.Competing },
{ name: "the game of \"this darned word count\" ๐", type: ActivityType.Competing },
{ name: "a world of unfair deadlines ๐", type: ActivityType.Competing },
{ name: "the library for the quietest spot ๐", type: ActivityType.Competing },
];
module.exports = statuses;
In this case, where would I initialize my first status? I believe this should be set up in my index.js