Skip to content

Commit

Permalink
Merge branch 'main' into feature/enhance-queue
Browse files Browse the repository at this point in the history
  • Loading branch information
Sachaa-Thanasius authored Dec 14, 2023
2 parents 779844c + 5f926ea commit 5fd627a
Show file tree
Hide file tree
Showing 15 changed files with 705 additions and 117 deletions.
91 changes: 91 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<div align="center">


![Logo](https://raw.githubusercontent.com/PythonistaGuild/Wavelink/master/logo.png)

![Python Version](https://img.shields.io/pypi/pyversions/Wavelink)
[![PyPI - Version](https://img.shields.io/pypi/v/Wavelink)](https://pypi.org/project/wavelink/)
[![Github License](https://img.shields.io/github/license/PythonistaGuild/Wavelink)](LICENSE)
[![Lavalink Version](https://img.shields.io/badge/Lavalink-v4.0%2B-blue?color=%23FB7713)](https://lavalink.dev)
![Lavalink Plugins](https://img.shields.io/badge/Lavalink_Plugins-Native_Support-blue?color=%2373D673)
[![Discord](https://img.shields.io/discord/490948346773635102?logo=discord&logoColor=%23FFF&label=Pythonista&labelColor=%235865F2&color=%232B2D31)](https://discord.gg/RAKc3HF)


</div>


Wavelink is a robust and powerful Lavalink wrapper for [Discord.py](https://github.com/Rapptz/discord.py)
Wavelink features a fully asynchronous API that's intuitive and easy to use.


# Migrating from Version 2 to Version 3:

[Migrating Guide](https://wavelink.dev/en/latest/migrating.html)


### Features

- Full asynchronous design.
- Lavalink v4+ Supported with REST API.
- discord.py v2.0.0+ Support.
- Advanced AutoPlay and track recommendations for continuous play.
- Object orientated design with stateful objects and payloads.
- Fully annotated and complies with Pyright strict typing.


## Getting Started

**See Examples:** [Examples](https://github.com/PythonistaGuild/Wavelink/tree/main/examples)

**Lavalink:** [GitHub](https://github.com/lavalink-devs/Lavalink/releases), [Webpage](https://lavalink.dev)


## Documentation

[Official Documentation](https://wavelink.dev/en/latest)

## Support

For support using WaveLink, please join the official [Support Server](https://discord.gg/RAKc3HF) on
[Discord](https://discordapp.com)

[![Discord Banner](https://discordapp.com/api/guilds/490948346773635102/widget.png?style=banner2)](https://discord.gg/RAKc3HF)


## Installation

**WaveLink 3 requires Python 3.10+**

**Windows**


```sh
py -3.10 -m pip install -U wavelink
```

**Linux**

```sh
python3.10 -m pip install -U wavelink
```

**Virtual Environments**

```sh
pip install -U wavelink
```


## Lavalink

Wavelink **3** requires **Lavalink v4**.
See: [Lavalink](https://github.com/lavalink-devs/Lavalink/releases)

For spotify support, simply install and use [LavaSrc](https://github.com/topi314/LavaSrc) with your `wavelink.Playable`


### Notes

- Wavelink **3** is compatible with Lavalink **v4+**.
- Wavelink has built in support for Lavalink Plugins including LavaSrc and SponsorBlock.
- Wavelink is fully typed in compliance with Pyright Strict, though some nuances remain between discord.py and wavelink.
103 changes: 0 additions & 103 deletions README.rst

This file was deleted.

7 changes: 7 additions & 0 deletions docs/migrating.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ Added
- :meth:`wavelink.Node.send`
- :class:`wavelink.Search`
- LFU (Least Frequently Used) Cache for request caching.
- :meth:`wavelink.Node.fetch_info`
- :meth:`wavelink.Node.fetch_stats`
- :meth:`wavelink.Node.fetch_version`
- :meth:`wavelink.Node.fetch_player_info`
- :meth:`wavelink.Node.fetch_players`
- :attr:`wavelink.Playable.extras`
- :func:`wavelink.on_wavelink_extra_event`


Connecting
Expand Down
66 changes: 66 additions & 0 deletions docs/wavelink.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,18 @@ An event listener in a cog.
Called when a node has been closed and cleaned-up. The second parameter ``disconnected`` is a list of
:class:`wavelink.Player` that were connected on this Node and are now disconnected.

.. function:: on_wavelink_extra_event(payload: wavelink.ExtraEventPayload)

Called when an ``Unknown`` and/or ``Unhandled`` event is recevied via Lavalink. This is most likely due to
a plugin like SponsorBlock sending custom event data. The payload includes the raw data sent from Lavalink.

.. note::

Please see the documentation for your Lavalink plugins to determine what data they send.


.. versionadded:: 3.1.0


Types
-----
Expand Down Expand Up @@ -150,6 +162,51 @@ Payloads
.. autoclass:: StatsEventFrames
:members:

.. attributetable:: StatsResponsePayload

.. autoclass:: StatsResponsePayload
:members:

.. attributetable:: PlayerStatePayload

.. autoclass:: PlayerStatePayload
:members:

.. attributetable:: VoiceStatePayload

.. autoclass:: VoiceStatePayload
:members:

.. attributetable:: PlayerResponsePayload

.. autoclass:: PlayerResponsePayload
:members:

.. attributetable:: GitResponsePayload

.. autoclass:: GitResponsePayload
:members:

.. attributetable:: VersionResponsePayload

.. autoclass:: VersionResponsePayload
:members:

.. attributetable:: PluginResponsePayload

.. autoclass:: PluginResponsePayload
:members:

.. attributetable:: InfoResponsePayload

.. autoclass:: InfoResponsePayload
:members:

.. attributetable:: ExtraEventPayload

.. autoclass:: ExtraEventPayload
:members:


Enums
-----
Expand Down Expand Up @@ -307,6 +364,15 @@ Filters
:members:


Utils
-----

.. attributetable:: ExtrasNamespace

.. autoclass:: ExtrasNamespace



Exceptions
----------

Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ build-backend = "setuptools.build_meta"

[project]
name = "wavelink"
version = "3.0.0"
version = "3.1.0"
authors = [
{ name="PythonistaGuild, EvieePy", email="[email protected]" },
]
dynamic = ["dependencies"]
description = "A robust and powerful, fully asynchronous Lavalink wrapper built for discord.py in Python."
readme = "README.rst"
readme = "README.md"
requires-python = ">=3.10"
classifiers = [
"License :: OSI Approved :: MIT License",
Expand All @@ -19,6 +19,7 @@ classifiers = [
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Internet",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
Expand Down
3 changes: 2 additions & 1 deletion wavelink/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
__author__ = "PythonistaGuild, EvieePy"
__license__ = "MIT"
__copyright__ = "Copyright 2019-Present (c) PythonistaGuild, EvieePy"
__version__ = "3.0.0"
__version__ = "3.1.0"


from .enums import *
Expand All @@ -38,3 +38,4 @@
from .player import Player as Player
from .queue import *
from .tracks import *
from .utils import ExtrasNamespace as ExtrasNamespace
Loading

0 comments on commit 5fd627a

Please sign in to comment.