{"id":21685986,"url":"https://github.com/ooliver1/mafic","last_synced_at":"2025-04-05T12:02:18.169Z","repository":{"id":63908538,"uuid":"535863434","full_name":"ooliver1/mafic","owner":"ooliver1","description":"A properly typehinted lavalink client for discord.py, nextcord, disnake and py-cord.","archived":false,"fork":false,"pushed_at":"2025-03-24T17:10:03.000Z","size":382,"stargazers_count":65,"open_issues_count":15,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T11:04:20.361Z","etag":null,"topics":["discord-py","disnake","disnake-py","fully-typed","lavalink","lavalink-client","lavalink-music","lavalink-wrapper","nextcord","nextcord-py","py-cord","pycord","python","python3","typed","wrapper"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ooliver1.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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},"funding":{"github":"ooliver1","custom":["https://paypal.me/tootybot"]}},"created_at":"2022-09-12T21:53:21.000Z","updated_at":"2025-01-27T17:46:52.000Z","dependencies_parsed_at":"2023-09-26T01:58:08.416Z","dependency_job_id":"16b1fc3e-a437-4ee6-a765-a1760ac60107","html_url":"https://github.com/ooliver1/mafic","commit_stats":{"total_commits":142,"total_committers":3,"mean_commits":"47.333333333333336","dds":0.04225352112676062,"last_synced_commit":"e1741fa3eac13dd14f4fa4e594ba0eaabdf97180"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ooliver1%2Fmafic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ooliver1%2Fmafic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ooliver1%2Fmafic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ooliver1%2Fmafic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ooliver1","download_url":"https://codeload.github.com/ooliver1/mafic/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247332559,"owners_count":20921853,"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":["discord-py","disnake","disnake-py","fully-typed","lavalink","lavalink-client","lavalink-music","lavalink-wrapper","nextcord","nextcord-py","py-cord","pycord","python","python3","typed","wrapper"],"created_at":"2024-11-25T16:27:11.991Z","updated_at":"2025-04-05T12:02:18.122Z","avatar_url":"https://github.com/ooliver1.png","language":"Python","funding_links":["https://github.com/sponsors/ooliver1","https://paypal.me/tootybot"],"categories":[],"sub_categories":[],"readme":"# Mafic\n\n[![MIT License](https://custom-icon-badges.demolab.com/github/license/ooliver1/mafic?color=845ec2\u0026logo=code-square)](https://github.com/ooliver1/mafic/blob/master/LICENSE \"License File\")\n[![Releases](https://custom-icon-badges.demolab.com/github/v/release/ooliver1/mafic?display_name=tag\u0026include_prereleases\u0026sort=semver\u0026logo=commit\u0026color=c25db8)](https://github.com/ooliver1/mafic/releases \"Mafic Releases\")\n[![Discord](https://img.shields.io/discord/864563184919773226?color=f062a4\u0026logo=discord\u0026logoColor=white)](https://discord.gg/mMvUABNegY \"Discord Server\")\n[![Lint Workflow Status](https://custom-icon-badges.demolab.com/github/actions/workflow/status/ooliver1/mafic/lint.yml?label=lint\u0026logo=codescan-checkmark\u0026color=ff738c)](https://github.com/ooliver1/mafic/actions/workflows/lint.yml \"Lint Workflow\")\n[![PyPI - Status](https://img.shields.io/pypi/status/mafic?color=ff9075\u0026label=PyPI\u0026logo=pypi\u0026logoColor=white)](https://pypi.org/project/mafic \"Mafic PyPI Project\")\n[![Open Issues](https://custom-icon-badges.demolab.com/github/issues-raw/ooliver1/mafic?logo=issue-opened\u0026color=ffb263)](https://github.com/ooliver1/mafic/issues \"Open Issues\")\n[![Open PRs](https://custom-icon-badges.demolab.com/github/issues-pr-raw/ooliver1/mafic?logo=git-pull-request\u0026color=ffd55f)](https://github.com/ooliver1/mafic/pulls \"Open Pull Requests\")\n[![Read the Docs](https://img.shields.io/readthedocs/mafic?logo=read%20the%20docs\u0026logoColor=white\u0026color=f9f871)](https://mafic.readthedocs.io/en/latest/)\n\nA properly typehinted lavalink client for discord.py, nextcord, disnake and py-cord.\n\n## Installation\n\n```bash\npip install mafic\n```\n\n\u003e **Note**\n\u003e Use `python -m`, `py -m`, `python3 -m` or similar if that is how you install packages.\n\u003e Generally windows uses `py -m pip` and linux uses `python3 -m pip`\n\n## Discord Server\n\n[Join the Discord Server](https://discord.gg/mMvUABNegY) for support and updates.\n\n## Documentation\n\n[Read the docs](https://mafic.readthedocs.io/en/latest/).\n\n## Features\n\n- Fully customisable node balancing.\n- Multi-node support.\n- Filters.\n- Full API coverage.\n- Properly typehinted for Pyright strict.\n\n## Usage\n\nGo to the [Lavalink Repository](https://github.com/freyacodes/lavalink#server-configuration)\nto set up a Lavalink node.\n\n```python\nimport os\n\nimport mafic\nimport nextcord\nfrom nextcord.ext import commands\n\n\nclass MyBot(commands.Bot):\n    def __init__(self, *args, **kwargs):\n        super().__init__(*args, **kwargs)\n\n        self.pool = mafic.NodePool(self)\n        self.loop.create_task(self.add_nodes())\n\n    async def add_nodes(self):\n        await self.pool.create_node(\n            host=\"127.0.0.1\",\n            port=2333,\n            label=\"MAIN\",\n            password=\"\u003cpassword\u003e\",\n        )\n\n\nbot = MyBot(intents=nextcord.Intents(guilds=True, voice_states=True))\n\n\n@bot.slash_command(dm_permission=False)\nasync def play(inter: nextcord.Interaction, query: str):\n    if not inter.guild.voice_client:\n        player = await inter.user.voice.channel.connect(cls=mafic.Player)\n    else:\n        player = inter.guild.voice_client\n\n    tracks = await player.fetch_tracks(query)\n\n    if not tracks:\n        return await inter.send(\"No tracks found.\")\n\n    track = tracks[0]\n\n    await player.play(track)\n\n    await inter.send(f\"Playing {track.title}.\")\n\n\nbot.run(...)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fooliver1%2Fmafic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fooliver1%2Fmafic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fooliver1%2Fmafic/lists"}