What is the 24/7 Command in Discord? (Autojoin Tutorial)
If you have ever used a music bot in a Discord server, you are probably familiar with this situation: you pause a song, step away for a cup of water, and return only to find the bot has disconnected. Or, the music queue ends, and within a few minutes, the bot leaves the channel to save resources.
While this resource-saving behavior is standard, it can get highly annoying if you want an uninterrupted listening experience. This is where the **24/7 Command** comes into play. In this article, we will break down what the 24/7 command actually is, why you should use it, and how to enable it on your Discord server using Anya.
What is the 24/7 Command?
The 24/7 command (or /247) is a premium control command that forces a Discord music bot to stay connected to a designated voice channel indefinitely. When active, it disables the bot's automatic idle-disconnect and empty-channel timeout routines. The bot stays in the channel 24 hours a day, 7 days a week, waiting for your next song request.
Why Use the 24/7 Command?
Enabling 24/7 mode offers several major benefits for active communities and voice hangouts:
- Zero Delay Playback: Since the bot is already in the channel, typing
/playstarts playing the music instantly without waiting for the bot to join and initialize the voice connection. - Lounge & Radio Channels: Ideal for servers that have a dedicated "24/7 Music Room" or "Lounge" where members can drop in and listen to music together at any time of the day.
- No Resource Re-Allocation: Avoids the bot constantly jumping in and out of channels, resulting in a cleaner and more stable Discord voice connection.
- Survives Bot Restarts (Autojoin): Anya's 24/7 mode syncs directly with our database. If the bot restarts or crashes, it automatically rejoins its registered channels upon coming back online!
What Happens Under the Hood?
When you enable 24/7 mode, Anya executes several behind-the-scenes processes to guarantee stability:
- Database Registration: Your guild's Voice Channel ID and Text Channel ID are saved in the
Voice247collection. - Bypassing Disconnect Events: When the queue ends or the channel becomes empty, the voice connection state checks if the guild has 24/7 mode enabled. If true, it skips the leave timer entirely.
- Auto-Rejoin Protocol: When Anya restarts, the initialization handler fetches all active 24/7 records and sends autojoin signals to Lavalink nodes, reconnecting the audio player to your channel automatically.
How to Enable 24/7 Mode on Anya
Anya makes it incredibly easy to configure 24/7 mode in two different ways:
Method 1: Using the Slash Command
Simply join the target Voice Channel and type the 24/7 toggle command in any text channel:
/247
Anya will confirm that 24/7 mode has been enabled and she is now locked to your current voice channel.
Method 2: Via the Web Dashboard
- Go to the Anya Web Dashboard and log in with Discord.
- Select your Discord server from the list.
- In the **Player Settings** section, toggle the **24/7 Mode** switch to active.
- Select the default voice channel and text channel for the bot to lock onto.
- Click **Save Changes**, and the bot will immediately bind itself to that channel.
Discussion (0)
Join the Discussion
Log in with your Discord account to share comments, feedback, and ask questions.
Login with Discord