This Discord bot allows users to stream air traffic control (ATC) audio from LiveATC.net in a voice channel. It fetches the stream URLs from LiveATC.net using the specified ICAO code, allowing users to listen to real-time ATC communications.
- Fetches stream URLs from LiveATC.net using a specified ICAO code
- Plays ATC audio streams in a voice channel
- Commands for starting and reconnecting the audio stream
- Permission checks to ensure only authorized users can control the bot
- Error handling for playback errors and missing stream URLs
-
Clone the repository:
git clone https://github.com/NicoEugui/atc-discord-bot.git cd atc-discord-bot
-
Install the dependencies:
pip install -r requirements.txt
-
Download FFmpeg from ffmpeg.org or install it using Chocolatey:
choco install ffmpeg
-
Create a
.env
file based on.env.example
and fill in the necessary values such as Discord token, channel IDs, and roles. -
Run the bot:
python bot\bot.py
Once the bot is running and added to your Discord server, you can use the following commands:
!radio
: Start playing the ATC audio stream in the voice channel.!reconnect
: Reconnect the bot to the voice channel.
You need to configure the following constants in .env
:
DISCORD_TOKEN_BOT
: Your Discord bot token.CHANNEL_TO_SEND_MESSAGE
: ID of the channel where bot messages will be sent.CHANNEL_AUDIO_TORRE
: ID of the voice channel where the ATC audio stream will be played.ROLE_TO_SEND_MESSAGE
: ID of the role required to use bot commands.
- discord.py: Discord API wrapper
This project is licensed under the MIT License - see the LICENSE file for details.