Repository navigation
Commands
Description: Sends a simple greeting back to the user.
Usage: /greeting
Details: When this command is used, the bot responds with a friendly message mentioning the user.
Description: Puts the bot to sleep, preventing it from responding to any commands or messages.
Usage: /sleep
Permissions Required: Administrator
Details: This command toggles a global variable (is_sleeping) to True. While sleeping, the bot ignores all commands and messages except /wake.
Description: Wakes the bot, allowing it to respond to commands and messages again.
Usage: /wake
Permissions Required: Administrator
Details: This command toggles the is_sleeping variable back to False, re-enabling the bot's functionality.
Description: Makes the bot join the voice channel the user is currently in.
Usage: /join
Details: The bot connects to the user's voice channel. If it is already connected to a voice channel, it will notify the user.
Description: Makes the bot leave the voice channel it is currently in.
Usage: /leave
Details: The bot disconnects from the voice channel. If it is not connected, it notifies the user.
Description: Searches for a song on YouTube and plays it in the voice channel.
Usage: /play <song_name>
Details: The bot joins the user's voice channel if not already connected. Searches YouTube for the specified song using yt_dlp. Adds the song to the queue and plays it if no other song is currently playing. If there are songs in the queue, the bot will play them sequentially.
Description: Pauses the currently playing song.
Usage: /pause
Details: If a song is playing, the bot pauses playback. If no song is playing, it notifies the user.
Description: Resumes playback of a paused song.
Usage: /resume
Details: If playback is paused, the bot resumes the song. If no song is paused, it notifies the user.
Description: Displays the current song queue.
Usage: /queue
Details: The bot sends a message listing all the songs in the queue, with their order. If the queue is empty, the bot notifies the user.
Description: Disables a specific command, preventing it from being used.
Usage: /disable_command <command_name>
Permissions Required: Administrator
Details: Adds the specified command to the disabled_commands list. If the command is already disabled, the bot notifies the user. Disabled commands cannot be used until re-enabled.
Description: Re-enables a previously disabled command.
Usage: /enable_command <command_name>
Permissions Required: Administrator
Details: Removes the specified command from the disabled_commands list. If the command is not disabled or doesn't exist, the bot notifies the user.
Messages Containing "Tinee":
If a user mentions "tinee" in their message, the bot uses OpenAI's GPT-4 API to generate a response.
Tracks conversations per user using user_chats to maintain context.
Adding Songs: Each /play command adds the song to the global song queue.
Playing Songs: If no song is playing, the bot dequeues and plays the next song using FFmpegPCMAudio.
After Playback: Automatically starts the next song in the queue if one exists. If the queue is empty, the bot notifies the user.