#music bot
1 messages · Page 1 of 1 (latest)
@tribal pier
@ruby spruce @ruby spruce
the music bot leave vc after user leave
how to make it stay in vc 24/7
Edit the code add 24/7 feature what else
yes
i mean wich file have the auto leave code
i mean wich file have the auto leave code
events.js ig
this is sec?
Ye
ty man the bot now leave after 7days 🕙
where was that code line ?
bro
its leave after 5hour
@tribal pier its not sec
i give 1year sec
it leave after 5hour 😭
Send it to chatgpt and ask it to change system to year
chatgpt 
/home/container/AeroX/events/voiceStateUpdate.js
i mean this sec or milisec?
in last line
Oky
😉
Just take a ss and asked chatgtp
^^ 💯
i doit chatgpt give me same sec i all ready using it but is only do 5hour
oh shit
⚠️ You must accept these rules to use the bot!
This message is now inactive.
• Any actions performed to gain an unfair advantage over other users are explicitly against the rules. This includes but not limited to:
├> Using macros/scripts for any commands
└> Using multiple accounts for any reason
• Do not use any exploits and report any found in the bot
• You can not sell/trade cowoncy or any bot goods for anything outside of the bot
• If you have any questions come ask us in our server!
Privacy Policy - Terms of Service
Clicking on the button means you will follow the rules and acknowlege the consequences
Just send him whole code gng or use another ai
its milli sec
why you dont know your code 😭
The bot will be dead soon
yeah in 1-jun-2026
@tribal pier i puth this time but bot leave after 1sec 💀
Copy
Open chatgpt
Paste
ChatGPT said:
Here’s what the snippet is doing, broken down clearly:
aloneTimeouts.delete(guild.id);
}, 31536000000);
aloneTimeouts.set(guild.id, timeout);
What’s happening overall
This code is managing a timeout associated with a specific guild (server) using a Map called aloneTimeouts.
It does these things:
✅ 1. It creates a timeout that will run after a VERY long time
31536000000 milliseconds
= 31,536,000,000 ms
= 365 days (1 year)
So the callback function will run in one year.
✅ 2. Inside the timeout, it removes the guild’s timeout entry
aloneTimeouts.delete(guild.id);
This means:
When the timeout finishes (after 1 year),
The bot will remove this guild's ID from the aloneTimeouts map.
This prevents memory leaks by clearing old entries.
✅ 3. It stores the timeout in a Map
aloneTimeouts.set(guild.id, timeout);
This associates the created timeout with the guild ID, so the bot can:
cancel it later if needed
check whether it already exists
manage guild-specific actions
Example:
If the bot tracks when a music player is alone in a voice channel, it may set a “leave after X time” timeout.
🔍 What this pattern is commonly used for
This pattern is typical in Discord music bots to:
leave a voice channel after being alone too long
clear memory or cache for inactive guilds
run cleanup operations long after something happens
⚠️ Something odd: The timeframe is 1 year
If intentional → okay.
But most bots use something like 1–10 minutes, not ~365 days.
If it's meant to be something like “30 minutes,” the number should be:
30 minutes → 1800000
1 hour → 3600000
@tribal pier its say right but not working
Use another ai
Send it whole code
Not only one file
i say ai and i do same ai
but your code broken after this
😭
so wath i can do? 😭
You can live without 24/7 then
😭
i say to chat gpt again
and work
W
const { Events, ContainerBuilder, TextDisplayBuilder, MessageFlags } = require('discord.js');
const emojis = require('../emojis.json');
const aloneTimeouts = new Map();
module.exports = {
name: Events.VoiceStateUpdate,
async execute(oldState, newState) {
const client = newState.client || oldState.client;
const guild = newState.guild;
const player = client.poru.players.get(guild.id);
if (!player) return;
// If the bot disconnects, reconnect (depending on your join logic)
if (newState.id === client.user.id) {
if (!newState.channelId) {
// DO NOT destroy player
// DO NOT clear queue
// Bot stays alive 24/7
return;
}
}
// If bot is alone in channel → do nothing (24/7 mode)
const voiceChannel = guild.channels.cache.get(player.voiceChannel);
if (!voiceChannel) return;
const members = voiceChannel.members.filter(m => !m.user.bot);
if (members.size === 0) {
// 24/7 mode: no auto-leave
return;
}
},
};
dellet all msg and put this @cerulean bramble
in /home/container/AeroX/events/voiceStateUpdate.js
@tribal pier tysm ❤️
I didn't even do anything 😭
❤️
but you say to go chat gpt
💀
if you dont say then i cant solve this
so yeah you helped me
fine
its like helped doing nothing

Eat five star do ntg
ty man i have same problem