This Python script enables the automatic uploading and sending of voice messages in Discord channels. It provides a convenient way to handle voice messages through Discord's API.
- Upload voice messages to Discord channels.
- Send voice messages with audio attachments.
- Automatic handling of audio file uploading and message sending.
- Python 3.7 or higher
requests
library
- Clone this repository or download the script.
- Install the required Python libraries:
pip install requests
Before using the script, you need to set your Discord bot token:
- Obtain a Discord bot token from the Discord Developer Portal.
- In the script, replace TOKEN = None [line 4] with your bot token, like this:
TOKEN = "your_discord_bot_token_here"
To use the script, simply run it with Python and provide the necessary parameters:
python voice_message.py
- upload_voice_message(channel_id, audio_file_path): Uploads a voice message to the specified Discord channel.
- send_voice_message(channel_id, audio_file_path, audio_duration): Sends a voice message to the specified Discord channel.
- channel_id: The ID of the Discord channel where the message will be sent.
- audio_file_path: The file path of the audio message.
- audio_duration: The duration of the audio message in seconds (optional).
Contributions to this project are welcome. Please open an issue or pull request on the project's GitHub page.
The original idea for this project was contributed by a member @LostMyInfo from the official Discord Developers server. We are grateful for his innovative idea and encourage similar contributions from the community.
This project is licensed under the MIT License. See the LICENSE file for more details.