{"id":13592430,"url":"https://github.com/cloudwithax/pomice","last_synced_at":"2025-04-04T09:06:41.052Z","repository":{"id":41986667,"uuid":"410340746","full_name":"cloudwithax/pomice","owner":"cloudwithax","description":"The modern Lavalink wrapper designed for discord.py","archived":false,"fork":false,"pushed_at":"2025-02-03T18:20:00.000Z","size":857,"stargazers_count":66,"open_issues_count":3,"forks_count":33,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-28T08:07:34.682Z","etag":null,"topics":["apple-music","asyncio","audio","bot","client","discord","discord-bot","discord-py","discord-server","lavalink","lavalink-client","lavalink-wrapper","lavaplayer","music","python","spotify","spotify-api","youtube","youtube-api"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloudwithax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-25T17:39:13.000Z","updated_at":"2025-03-04T07:31:15.000Z","dependencies_parsed_at":"2023-12-25T20:11:20.609Z","dependency_job_id":"563fc275-6521-4d96-9b30-5a89a6bb2234","html_url":"https://github.com/cloudwithax/pomice","commit_stats":{"total_commits":286,"total_committers":12,"mean_commits":"23.833333333333332","dds":0.6083916083916083,"last_synced_commit":"6ed2fd961bae64c1b16706200bfa98692daed92e"},"previous_names":[],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudwithax%2Fpomice","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudwithax%2Fpomice/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudwithax%2Fpomice/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloudwithax%2Fpomice/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloudwithax","download_url":"https://codeload.github.com/cloudwithax/pomice/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247149500,"owners_count":20891954,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apple-music","asyncio","audio","bot","client","discord","discord-bot","discord-py","discord-server","lavalink","lavalink-client","lavalink-wrapper","lavaplayer","music","python","spotify","spotify-api","youtube","youtube-api"],"created_at":"2024-08-01T16:01:09.145Z","updated_at":"2025-04-04T09:06:41.027Z","avatar_url":"https://github.com/cloudwithax.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Pomice\n\n![](https://raw.githubusercontent.com/cloudwithax/pomice/main/banner.jpg)\n\n\n[![GPL](https://img.shields.io/github/license/cloudwithax/pomice?color=2f2f2f)](https://github.com/cloudwithax/pomice/blob/main/LICENSE) ![](https://img.shields.io/pypi/pyversions/pomice?color=2f2f2f) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![Discord](https://img.shields.io/discord/899324069235810315?color=%237289DA\u0026label=Pomice%20Support\u0026logo=discord\u0026logoColor=white)](https://discord.gg/r64qjTSHG8) [![Read the Docs](https://readthedocs.org/projects/pomice/badge/?version=latest)](https://pomice.readthedocs.io/en/latest/)\n\n\nPomice is a fully asynchronous Python library designed for communicating with [Lavalink](https://github.com/freyacodes/Lavalink) seamlessly within the [discord.py](https://github.com/Rapptz/discord.py) library. It features 100% coverage of the [Lavalink](https://github.com/freyacodes/Lavalink) spec that can be accessed with easy-to-understand functions along with Spotify and Apple Music querying capabilities using built-in custom clients, making it easier to develop your next big music bot.\n\n## Quick Links\n- [Discord Server](https://discord.gg/r64qjTSHG8)\n- [Read the Docs](https://pomice.readthedocs.io/en/latest/)\n- [PyPI Homepage](https://pypi.org/project/pomice/)\n\n\n# Install\nTo install the library, you need the lastest version of pip and minimum Python 3.8\n\n\u003e Stable version\n```\npip install pomice\n```\n\n\u003e Unstable version (this one gets more frequent changes)\n```\npip install git+https://github.com/cloudwithax/pomice\n```\n\n# Support And Documentation\n\nThe official documentation is [here](https://pomice.readthedocs.io/en/latest/)\n\nYou can join our support server [here](https://discord.gg/r64qjTSHG8)\n\n\n# Examples\nIn-depth examples are located in the [examples folder](https://github.com/cloudwithax/pomice/tree/main/examples)\n\nHere's a quick example:\n\n```py\nimport pomice\nimport discord\nimport re\n\nfrom discord.ext import commands\n\nURL_REG = re.compile(r'https?://(?:www\\.)?.+')\n\nclass MyBot(commands.Bot):\n\n    def __init__(self) -\u003e None:\n        super().__init__(command_prefix='!', activity=discord.Activity(type=discord.ActivityType.listening, name='to music!'))\n\n        self.add_cog(Music(self))\n\n    async def on_ready(self) -\u003e None:\n        print(\"I'm online!\")\n        await self.cogs[\"Music\"].start_nodes()\n\n\nclass Music(commands.Cog):\n\n    def __init__(self, bot) -\u003e None:\n        self.bot = bot\n\n        self.pomice = pomice.NodePool()\n\n    async def start_nodes(self):\n        await self.pomice.create_node(bot=self.bot, host='127.0.0.1', port='3030',\n                                     password='youshallnotpass', identifier='MAIN')\n        print(f\"Node is ready!\")\n\n\n\n    @commands.command(name='join', aliases=['connect'])\n    async def join(self, ctx: commands.Context, *, channel: discord.TextChannel = None) -\u003e None:\n\n        if not channel:\n            channel = getattr(ctx.author.voice, 'channel', None)\n            if not channel:\n                raise commands.CheckFailure('You must be in a voice channel to use this command'\n                                            'without specifying the channel argument.')\n\n\n        await ctx.author.voice.channel.connect(cls=pomice.Player)\n        await ctx.send(f'Joined the voice channel `{channel}`')\n\n    @commands.command(name='play')\n    async def play(self, ctx, *, search: str) -\u003e None:\n\n        if not ctx.voice_client:\n            await ctx.invoke(self.join)\n\n        player = ctx.voice_client\n\n        results = await player.get_tracks(query=f'{search}')\n\n        if not results:\n            raise commands.CommandError('No results were found for that search term.')\n\n        if isinstance(results, pomice.Playlist):\n            await player.play(track=results.tracks[0])\n        else:\n            await player.play(track=results[0])\n\n\nbot = MyBot()\nbot.run(\"token here\")\n ```\n\n# FAQ\nWhy is it saying \"Cannot connect to host\"?\n\n- You need to have a Lavalink node setup before you can use this library. Download it [here](https://github.com/freyacodes/Lavalink/releases/latest)\n\nWhat experience do I need?\n\n- This library requires that you have some experience with Python, asynchronous programming and the discord.py library.\n\nWhy is it saying \"No module named pomice found\"?\n\n- You need to [install](#Install) the package before you can use it\n\n# Contributors\n\n- Thanks to [vveeps](https://github.com/vveeps) for implementing some features I wasn't able to do myself\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudwithax%2Fpomice","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloudwithax%2Fpomice","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloudwithax%2Fpomice/lists"}