Skip to main content
https://raw.githubusercontent.com/PythonistaGuild/Wavelink/master/logo.png https://img.shields.io/badge/Python-3.10%20%7C%203.11-blue.svg https://img.shields.io/github/license/EvieePy/Wavelink.svg https://img.shields.io/discord/490948346773635102?color=%237289DA&label=Pythonista&logo=discord&logoColor=white PyPI - Downloads Maintenance

Wavelink is a robust and powerful Lavalink wrapper for Discord.py. Wavelink features a fully asynchronous API that’s intuitive and easy to use with built in Spotify Support and Node Pool Balancing.

Features:

  • Fully Asynchronous

  • Auto-Play and Looping (With the inbuilt Queue system)

  • Spotify Support

  • Node Balancing and Fail-over

  • Supports Lavalink 3.7+

Documentation

Official Documentation

Support

For support using WaveLink, please join the official support server on Discord.

https://discordapp.com/api/guilds/490948346773635102/widget.png?style=banner2

Installation

The following commands are currently the valid ways of installing WaveLink.

WaveLink 2 requires Python 3.10+

Windows

py -3.10 -m pip install -U Wavelink

Linux

python3.10 -m pip install -U Wavelink

Getting Started

See also: Examples

import discord
import wavelink
from discord.ext import commands


class Bot(commands.Bot):

    def __init__(self) -> None:
        intents = discord.Intents.default()
        intents.message_content = True

        super().__init__(intents=intents, command_prefix='?')

    async def on_ready(self) -> None:
        print(f'Logged in {self.user} | {self.user.id}')

    async def setup_hook(self) -> None:
        # Wavelink 2.0 has made connecting Nodes easier... Simply create each Node
        # and pass it to NodePool.connect with the client/bot.
        node: wavelink.Node = wavelink.Node(uri='http://localhost:2333', password='youshallnotpass')
        await wavelink.NodePool.connect(client=self, nodes=[node])


bot = Bot()


@bot.command()
async def play(ctx: commands.Context, *, search: str) -> None:
    """Simple play command."""

    if not ctx.voice_client:
        vc: wavelink.Player = await ctx.author.voice.channel.connect(cls=wavelink.Player)
    else:
        vc: wavelink.Player = ctx.voice_client

    tracks = await wavelink.YouTubeTrack.search(search)
    if not tracks:
        await ctx.send(f'No tracks found with query: `{search}`')
        return

    track = tracks[0]
    await vc.play(track)


@bot.command()
async def disconnect(ctx: commands.Context) -> None:
    """Simple disconnect command.

    This command assumes there is a currently connected Player.
    """
    vc: wavelink.Player = ctx.voice_client
    await vc.disconnect()

Metadata

Release files for wavelinkcord 2.6.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for wavelinkcord 2.6.6
File Size Uploaded
wavelinkcord-2.6.6.tar.gz 38.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wavelinkcord 2.6.6
File Interpreter ABI Platform
wavelinkcord-2.6.6-py3-none-any.whl Python 3 none any Details

Total release size: 88.5 kB

Release files / wavelinkcord-2.6.6.tar.gz

Download URL wavelinkcord-2.6.6.tar.gz
Size 38.4 kB
Tags Source
SHA-256 checksum
How to use checksums
19cf08bb4369e3982f48990aa6509b670b693f407c14f1c46fc668df4653bcb9
BLAKE2b-256 checksum
How to use checksums
263385334b970f6185c64f278eecb6d77f6c0665b8dfa5b5a6ba05842ebd48dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release files / wavelinkcord-2.6.6-py3-none-any.whl

Download URL wavelinkcord-2.6.6-py3-none-any.whl
Size 50.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1d78402cbfca6191168cab4d533b514e0faf4b6f1023c14d0e057c3b9207e0e4
BLAKE2b-256 checksum
How to use checksums
f0d344c0d742cc0ac5bddef6cc1b3dd62de160b7ead6e4faabe8a4a1f13d8763
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.6

Release history Release notifications | RSS feed

This release

2.6.6 This release

2 release files

2.6.5

2 release files

2.5.1

2 release files

2.2.3

2 release files

2.2.1

2 release files

2.0.4

2 release files

2.0.3

2 release files

2.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page