ooliver1
mafic
Python

A properly typehinted lavalink client for discord.py, nextcord, disnake and py-cord.

Last updated Jun 29, 2026
76
Stars
9
Forks
7
Issues
0
Stars/day
Attention Score
30
Language breakdown
Python 99.7%
Dockerfile 0.2%
Shell 0.1%
โ–ธ Files click to expand
README

Mafic

MIT License Releases Discord Lint Workflow Status PyPI - Status Open Issues Open PRs Read the Docs

A properly typehinted lavalink client for discord.py, nextcord, disnake and py-cord.

Installation

pip install mafic
Note
Use python -m, py -m, python3 -m or similar if that is how you install packages.
Generally windows uses py -m pip and linux uses python3 -m pip

Discord Server

Join the Discord Server for support and updates.

Documentation

Read the docs.

Features

  • Fully customisable node balancing.
  • Multi-node support.
  • Filters.
  • Full API coverage.
  • Properly typehinted for Pyright strict.

Usage

Go to the Lavalink Repository to set up a Lavalink node.

import os

import mafic import nextcord from nextcord.ext import commands

class MyBot(commands.Bot): def init(self, args, *kwargs): super().init(args, *kwargs)

self.pool = mafic.NodePool(self) self.loop.createtask(self.addnodes())

async def add_nodes(self): await self.pool.create_node( host="127.0.0.1", port=2333, label="MAIN", password="<password>", )

bot = MyBot(intents=nextcord.Intents(guilds=True, voice_states=True))

@bot.slashcommand(dmpermission=False) async def play(inter: nextcord.Interaction, query: str): if not inter.guild.voice_client: player = await inter.user.voice.channel.connect(cls=mafic.Player) else: player = inter.guild.voice_client

tracks = await player.fetch_tracks(query)

if not tracks: return await inter.send("No tracks found.")

track = tracks[0]

await player.play(track)

await inter.send(f"Playing {track.title}.")

bot.run(...)

ยฉ 2026 GitRepoTrend ยท ooliver1/mafic ยท Updated daily from GitHub