Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Discord.py | 12,910 | 2,287 | 414 | 2 days ago | 68 | June 12, 2021 | 101 | mit | Python | |
An API wrapper for Discord written in Python. | ||||||||||
Wavelink | 299 | 2 | 6 | a day ago | 92 | June 06, 2022 | 39 | mit | Python | |
A powerful Lavalink library for Discord.py. | ||||||||||
Buttons | 19 | 1 | 1 | 2 years ago | 15 | February 25, 2020 | 3 | mit | Python | |
A simple to use interactive session and paginator with custom button support for discord.py. |
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:
For support using WaveLink, please join the official support server on Discord.
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
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
track = await wavelink.YouTubeTrack.search(search, return_first=True)
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()
Head to the official Lavalink repo and give it a star!
application.yml
in the folder we created earlier. You can open the yml in Notepad or any simple text editor.application.yml
and store it in a config for your bot.application.yml
if you wish to use wavelink.LocalTrack
for local machine search options... Otherwise ignore.cd
into the folder we made earlier.java -jar Lavalink.jar
If you are having any problems installing Lavalink, please join the official Discord Server listed above for help.