Wavelink


NameWavelink JSON
Version 2.6.0 PyPI version JSON
download
home_page
SummaryA robust and powerful Lavalink wrapper for discord.py
upload_time2023-07-12 04:06:21
maintainer
docs_urlNone
author
requires_python>=3.10
license
keywords
VCS
bugtrack_url
requirements aiohttp discord.py yarl
Travis-CI No Travis.
coveralls test coverage No coveralls.
            .. image:: https://raw.githubusercontent.com/PythonistaGuild/Wavelink/master/logo.png


.. image:: https://img.shields.io/badge/Python-3.10%20%7C%203.11-blue.svg
    :target: https://www.python.org


.. image:: https://img.shields.io/github/license/EvieePy/Wavelink.svg
    :target: LICENSE


.. image:: https://img.shields.io/discord/490948346773635102?color=%237289DA&label=Pythonista&logo=discord&logoColor=white
   :target: https://discord.gg/RAKc3HF


.. image:: https://img.shields.io/pypi/dm/Wavelink?color=black
    :target: https://pypi.org/project/Wavelink
    :alt: PyPI - Downloads


.. image:: https://img.shields.io/maintenance/yes/2023?color=pink&style=for-the-badge
    :target: https://github.com/PythonistaGuild/Wavelink/commits/main
    :alt: Maintenance



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 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 <https://wavelink.dev/>`_

Support
---------------------------
For support using WaveLink, please join the official `support server
<https://discord.gg/RAKc3HF>`_ on `Discord <https://discordapp.com/>`_.

.. image:: https://discordapp.com/api/guilds/490948346773635102/widget.png?style=banner2
    :target: https://discord.gg/RAKc3HF


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

**WaveLink 2 requires Python 3.10+**

**Windows**

.. code:: sh

    py -3.10 -m pip install -U Wavelink

**Linux**

.. code:: sh

    python3.10 -m pip install -U Wavelink

Getting Started
----------------------------

**See also:** `Examples <https://github.com/PythonistaGuild/Wavelink/tree/main/examples>`_

.. code:: py

    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()


Lavalink Installation
---------------------

Head to the official `Lavalink repo <https://github.com/lavalink-devs/Lavalink>`_ and give it a star!

- Create a folder for storing Lavalink.jar and related files/folders.
- Copy and paste the example `application.yml <https://github.com/freyacodes/Lavalink#server-configuration>`_ to ``application.yml`` in the folder we created earlier. You can open the yml in Notepad or any simple text editor.
- Change your password in the ``application.yml`` and store it in a config for your bot.
- Set local to true in the ``application.yml`` if you wish to use ``wavelink.LocalTrack`` for local machine search options... Otherwise ignore.
- Save and exit.
- Install `Java 17(Windows) <https://download.oracle.com/java/17/latest/jdk-17_windows-x64_bin.exe>`_ or **Java 13+** on the machine you are running.
- Download `Lavalink.jar <https://github.com/lavalink-devs/Lavalink/releases>`_ and place it in the folder created earlier.
- Open a cmd prompt or terminal and change directory ``cd`` into the folder we made earlier.
- Run: ``java -jar Lavalink.jar``

If you are having any problems installing Lavalink, please join the official Discord Server listed above for help.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "Wavelink",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "",
    "author": "",
    "author_email": "EvieePy <evieepy@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/f5/6a/7d318ba8dd54ba9fa5a3b1c42ab508a653c902218ff76858d20aefecb4a9/Wavelink-2.6.0.tar.gz",
    "platform": null,
    "description": ".. image:: https://raw.githubusercontent.com/PythonistaGuild/Wavelink/master/logo.png\r\n\r\n\r\n.. image:: https://img.shields.io/badge/Python-3.10%20%7C%203.11-blue.svg\r\n    :target: https://www.python.org\r\n\r\n\r\n.. image:: https://img.shields.io/github/license/EvieePy/Wavelink.svg\r\n    :target: LICENSE\r\n\r\n\r\n.. image:: https://img.shields.io/discord/490948346773635102?color=%237289DA&label=Pythonista&logo=discord&logoColor=white\r\n   :target: https://discord.gg/RAKc3HF\r\n\r\n\r\n.. image:: https://img.shields.io/pypi/dm/Wavelink?color=black\r\n    :target: https://pypi.org/project/Wavelink\r\n    :alt: PyPI - Downloads\r\n\r\n\r\n.. image:: https://img.shields.io/maintenance/yes/2023?color=pink&style=for-the-badge\r\n    :target: https://github.com/PythonistaGuild/Wavelink/commits/main\r\n    :alt: Maintenance\r\n\r\n\r\n\r\nWavelink is a robust and powerful Lavalink wrapper for `Discord.py <https://github.com/Rapptz/discord.py>`_.\r\nWavelink features a fully asynchronous API that's intuitive and easy to use with built in Spotify Support and Node Pool Balancing.\r\n\r\n\r\n**Features:**\r\n\r\n- Fully Asynchronous\r\n- Auto-Play and Looping (With the inbuilt Queue system)\r\n- Spotify Support\r\n- Node Balancing and Fail-over\r\n- Supports Lavalink 3.7+\r\n\r\n\r\nDocumentation\r\n---------------------------\r\n`Official Documentation <https://wavelink.dev/>`_\r\n\r\nSupport\r\n---------------------------\r\nFor support using WaveLink, please join the official `support server\r\n<https://discord.gg/RAKc3HF>`_ on `Discord <https://discordapp.com/>`_.\r\n\r\n.. image:: https://discordapp.com/api/guilds/490948346773635102/widget.png?style=banner2\r\n    :target: https://discord.gg/RAKc3HF\r\n\r\n\r\nInstallation\r\n---------------------------\r\nThe following commands are currently the valid ways of installing WaveLink.\r\n\r\n**WaveLink 2 requires Python 3.10+**\r\n\r\n**Windows**\r\n\r\n.. code:: sh\r\n\r\n    py -3.10 -m pip install -U Wavelink\r\n\r\n**Linux**\r\n\r\n.. code:: sh\r\n\r\n    python3.10 -m pip install -U Wavelink\r\n\r\nGetting Started\r\n----------------------------\r\n\r\n**See also:** `Examples <https://github.com/PythonistaGuild/Wavelink/tree/main/examples>`_\r\n\r\n.. code:: py\r\n\r\n    import discord\r\n    import wavelink\r\n    from discord.ext import commands\r\n\r\n\r\n    class Bot(commands.Bot):\r\n\r\n        def __init__(self) -> None:\r\n            intents = discord.Intents.default()\r\n            intents.message_content = True\r\n\r\n            super().__init__(intents=intents, command_prefix='?')\r\n\r\n        async def on_ready(self) -> None:\r\n            print(f'Logged in {self.user} | {self.user.id}')\r\n\r\n        async def setup_hook(self) -> None:\r\n            # Wavelink 2.0 has made connecting Nodes easier... Simply create each Node\r\n            # and pass it to NodePool.connect with the client/bot.\r\n            node: wavelink.Node = wavelink.Node(uri='http://localhost:2333', password='youshallnotpass')\r\n            await wavelink.NodePool.connect(client=self, nodes=[node])\r\n\r\n\r\n    bot = Bot()\r\n\r\n\r\n    @bot.command()\r\n    async def play(ctx: commands.Context, *, search: str) -> None:\r\n        \"\"\"Simple play command.\"\"\"\r\n\r\n        if not ctx.voice_client:\r\n            vc: wavelink.Player = await ctx.author.voice.channel.connect(cls=wavelink.Player)\r\n        else:\r\n            vc: wavelink.Player = ctx.voice_client\r\n\r\n        tracks = await wavelink.YouTubeTrack.search(search)\r\n        if not tracks:\r\n            await ctx.send(f'No tracks found with query: `{search}`')\r\n            return\r\n\r\n        track = tracks[0]\r\n        await vc.play(track)\r\n\r\n\r\n    @bot.command()\r\n    async def disconnect(ctx: commands.Context) -> None:\r\n        \"\"\"Simple disconnect command.\r\n\r\n        This command assumes there is a currently connected Player.\r\n        \"\"\"\r\n        vc: wavelink.Player = ctx.voice_client\r\n        await vc.disconnect()\r\n\r\n\r\nLavalink Installation\r\n---------------------\r\n\r\nHead to the official `Lavalink repo <https://github.com/lavalink-devs/Lavalink>`_ and give it a star!\r\n\r\n- Create a folder for storing Lavalink.jar and related files/folders.\r\n- Copy and paste the example `application.yml <https://github.com/freyacodes/Lavalink#server-configuration>`_ to ``application.yml`` in the folder we created earlier. You can open the yml in Notepad or any simple text editor.\r\n- Change your password in the ``application.yml`` and store it in a config for your bot.\r\n- Set local to true in the ``application.yml`` if you wish to use ``wavelink.LocalTrack`` for local machine search options... Otherwise ignore.\r\n- Save and exit.\r\n- Install `Java 17(Windows) <https://download.oracle.com/java/17/latest/jdk-17_windows-x64_bin.exe>`_ or **Java 13+** on the machine you are running.\r\n- Download `Lavalink.jar <https://github.com/lavalink-devs/Lavalink/releases>`_ and place it in the folder created earlier.\r\n- Open a cmd prompt or terminal and change directory ``cd`` into the folder we made earlier.\r\n- Run: ``java -jar Lavalink.jar``\r\n\r\nIf you are having any problems installing Lavalink, please join the official Discord Server listed above for help.\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A robust and powerful Lavalink wrapper for discord.py",
    "version": "2.6.0",
    "project_urls": {
        "Homepage": "https://github.com/PythonistaGuild/Wavelink"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6ad77679b6ca18e8061c6533a271d91afc53437fbe5b4e5b3f6bb71410e8610f",
                "md5": "48244f8ef09129b2491717c7a3e96346",
                "sha256": "08eb33a33c58208dc25d9f093c54e4f0f3dddc0b9e54a38ff194b2ede86aa967"
            },
            "downloads": -1,
            "filename": "Wavelink-2.6.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "48244f8ef09129b2491717c7a3e96346",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 49763,
            "upload_time": "2023-07-12T04:06:19",
            "upload_time_iso_8601": "2023-07-12T04:06:19.184785Z",
            "url": "https://files.pythonhosted.org/packages/6a/d7/7679b6ca18e8061c6533a271d91afc53437fbe5b4e5b3f6bb71410e8610f/Wavelink-2.6.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f56a7d318ba8dd54ba9fa5a3b1c42ab508a653c902218ff76858d20aefecb4a9",
                "md5": "44081d408d714e8ad6f39cbb779751aa",
                "sha256": "3820ec6f728218e56813d2fd6b3655227dc9f814a7165bc19e77534bc04ca78b"
            },
            "downloads": -1,
            "filename": "Wavelink-2.6.0.tar.gz",
            "has_sig": false,
            "md5_digest": "44081d408d714e8ad6f39cbb779751aa",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 36123,
            "upload_time": "2023-07-12T04:06:21",
            "upload_time_iso_8601": "2023-07-12T04:06:21.546351Z",
            "url": "https://files.pythonhosted.org/packages/f5/6a/7d318ba8dd54ba9fa5a3b1c42ab508a653c902218ff76858d20aefecb4a9/Wavelink-2.6.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-12 04:06:21",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "PythonistaGuild",
    "github_project": "Wavelink",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "aiohttp",
            "specs": [
                [
                    ">=",
                    "3.7.4"
                ],
                [
                    "<",
                    "4"
                ]
            ]
        },
        {
            "name": "discord.py",
            "specs": [
                [
                    ">=",
                    "2.0.1"
                ]
            ]
        },
        {
            "name": "yarl",
            "specs": [
                [
                    "~=",
                    "1.8.2"
                ]
            ]
        }
    ],
    "lcname": "wavelink"
}
        
Elapsed time: 0.18858s