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