Coder Social home page Coder Social logo

kokosensei / discord-voice-message Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 21 KB

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.

License: MIT License

Python 100.00%

discord-voice-message's Introduction

Discord Voice Message API Wrapper

Overview

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.

Preview

demo

Features

  • Upload voice messages to Discord channels.
  • Send voice messages with audio attachments.
  • Automatic handling of audio file uploading and message sending.

Requirements

  • Python 3.7 or higher
  • requests library

Installation

  1. Clone this repository or download the script.
  2. Install the required Python libraries:
pip install requests

Setup

Before using the script, you need to set your Discord bot token:

  1. Obtain a Discord bot token from the Discord Developer Portal.
  2. In the script, replace TOKEN = None [line 4] with your bot token, like this:
TOKEN = "your_discord_bot_token_here"

Usage

To use the script, simply run it with Python and provide the necessary parameters:

python voice_message.py

Functions

  • 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.

Parameters

  • 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).

Contributing

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.

License


This project is licensed under the MIT License. See the LICENSE file for more details.

discord-voice-message's People

Watchers

kokoだよ avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.