Skip to main content

Voice module for `hikari`-based Discord bots

Project description

hikari-wave

Voice module for hikari-based Discord bots

  • Latest Version 0.0.1a4
  • Supports Python 3.10+

Documentation Status

What is hikari-wave?

hikari-wave is a standalone module for hikari (an asynchronous Discord API for building bots) that allows developers to easily manipulate voice-related systems and logic. Much like discord.py, hikari-wave implements a custom communication layer to communicate with Discord on the backend, while most other hikari-based bots use Lavalink as a backend, which requires a separate install.

What are hikari-wave's features?

  • Doesn't require third-party installs besides FFmpeg.
  • Easy to use, asynchronous API
  • Heavily type-hinted and type-safe
  • Supplemental events for further development ease and QoL

How do I use hikari-wave?

  • Install hikari-wave via PyPI: pip install hikari-wave
  • Import it into your program using import hikariwave
  • Verify FFmpeg is installed and discoverable in your system's PATH.

Documentation

You can find our documentation here.

Getting Started

You need a basic hikari bot set up, like below:

import hikari

bot: hikari.GatewayBot = hikari.GatewayBot(TOKEN_HERE)
bot.run()

This won't do anything besides sit and look pretty. The following will make the bot connect/disconnect if a user joins/leaves a voice channel:

# imports and bot/client definition

@bot.listen(hikariwave.MemberJoinVoiceEvent)
async def member_joined_voice(event: hikariwave.MemberJoinVoiceEvent) -> None:
    await voice.connect(event.guild_id, event.channel_id)

@bot.listen(hikariwave.MemberLeaveVoiceEvent)
async def member_left_voice(event: hikariwave.MemberLeaveVoiceEvent) -> None:
    await voice.disconnect(guild_id=event.guild_id)
    # OR - can work for either guild or channel, for convenience
    await voice.disconnect(channel_id=event.channel_id)

bot.run()

To make this play audio, get the connection and then play:

@bot.listen(hikariwave.MemberJoinVoiceEvent)
async def member_joined_voice(event: hikariwave.MemberJoinVoiceEvent) -> None:
    connection: hikariwave.VoiceConnection = await voice.connect(event.guild_id, event.channel_id)
    source: FileAudioSource = FileAudioSource("test.mp3")

    await connection.play(source)

Super easy and convenient!

Implemented Steps

  • Connect/Disconnect logic
  • Playing audio
  • Move/Reconnect/Resume logic
  • Supplemental events
  • Audio types: files, URLs, etc.
    1. Files
    2. Web (URLs)
    3. Buffers (bytes-like)
    4. Media sites (YouTube, SoundCloud, etc.)
  • Player QoL (queue, shuffle, prev/next, etc.)
  • DAVE (Discord Audio/Video End-to-End Encryption)

Reporting Bugs

  • If you find a bug or issue, please open an issue on the Issues page above.
  • Be sure to provide detailed information to help us understand and reproduce the problem.

Feature Requests

  • We welcome suggestions for new features.
  • If you have an idea, please open an issue on the Issues page above to discuss it first.
  • This ensures that we're all on the same page and helps us prioritize improvements.

Thanks for Contributing

Your contributions make this project better and more useful for everyone! Thank you for taking the time to improve this project!

License

This project is licensed under the MIT License. Copyright © 2025 WilDev Studios. All rights reserved.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hikari_wave-0.0.1a4.tar.gz (22.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hikari_wave-0.0.1a4-py3-none-any.whl (27.2 kB view details)

Uploaded Python 3

File details

Details for the file hikari_wave-0.0.1a4.tar.gz.

File metadata

  • Download URL: hikari_wave-0.0.1a4.tar.gz
  • Upload date:
  • Size: 22.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for hikari_wave-0.0.1a4.tar.gz
Algorithm Hash digest
SHA256 5b9fe3f14072585a43094c65b9034452a997ac92240223f64ed36f0ee3d48ab4
MD5 9ced8af54a22a849932aba6be4a8de3e
BLAKE2b-256 07e1460340f09f9c26e8756df2180ffa94e0b0c9de0f25e5e7e93924d8245b32

See more details on using hashes here.

File details

Details for the file hikari_wave-0.0.1a4-py3-none-any.whl.

File metadata

  • Download URL: hikari_wave-0.0.1a4-py3-none-any.whl
  • Upload date:
  • Size: 27.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.11

File hashes

Hashes for hikari_wave-0.0.1a4-py3-none-any.whl
Algorithm Hash digest
SHA256 9118dc94ddff6c3686f70407bd84bf19e6c9d1a5e1d3f8931db33bdde384ff51
MD5 6bbd6bcc918097cadc7130a68bf2236f
BLAKE2b-256 2556193045ea6b65ef2ec607f8e33b4c7988c74ccebedb340bf2a64ce0e10cca

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page