Tomato6966 / Musicium

An advanced Discord Music Bot with a Dashboard, using distube.js.org having an interactive button & menu system and many features! Supported Features: Spotify • YouTube • SoundCloud • Live Stream • Audio Filtering • DJ Roles • Autoplay • Autoresume • Dashboard + Live Queue • ...
https://musicium.eu
GNU General Public License v2.0
298 stars 310 forks source link

bot goes offline solution!! #111

Closed Araci-co closed 2 years ago

Araci-co commented 2 years ago

add this code to index.js

const activities_list = [
    { type: 'WATCHING', message: 'status1' },
    { type: 'WATCHING', message: 'status2' },
    { type: 'LISTENING', message: 'status3' },
    { type: 'WATCHING', message: 'status4' }
];

client.on('ready', () => {
    setInterval(() => {
        const index = Math.floor(Math.random() * (activities_list.length - 1) + 1);

        client.user.setActivity(activities_list[index].message, { type:     activities_list[index].type });
    }, 10000);
});

you can change status 1.....4

and remove this code from /handlers/functions.js/ (line 760 to 762)

  client.user.setActivity(`${config.prefix}help | ${client.guilds.cache.size} Guilds | ${Math.ceil(client.users.cache.size/1000)}k Members`, {
    type: "PLAYING",
  });

then bot will change status every 10s and never goes offline

Tomato6966 commented 2 years ago

This has nothing to do with the hosting of the bot

testbot-github commented 2 years ago

This has nothing to do with the hosting of the bot

THIS APPLIES TO REPLIT @Tomato6966 I think it is because if the bot is inactive [if the bot doesn't do anything] discord makes the bot offline, which happens to me, so the best way to fix it is to use the above way.