Skip to main content

Fork of discord.py (MIT License, © 2015-present Rapptz).

lolka.py (imported as import lolka) is a Python wrapper for the lolka bot API. It targets lolka by default — no manual REST/Gateway overrides needed — decodes lolka snowflakes, and resolves lolka CDN asset URLs. See LICENSE for licensing (the original MIT copyright is retained).

Installing

Python 3.8 or higher is required

# Linux/macOS
python3 -m pip install -U lolka.py

# Windows
py -3 -m pip install -U lolka.py

Quick Example

import lolka

class MyClient(lolka.Client):
    async def on_ready(self):
        print('Logged on as', self.user)

    async def on_message(self, message):
        if message.author == self.user:
            return

        if message.content == 'ping':
            await message.channel.send('pong')

intents = lolka.Intents.default()
intents.message_content = True
client = MyClient(intents=intents)
client.run('token')

Bot Example

import lolka
from lolka.ext import commands

intents = lolka.Intents.default()
intents.message_content = True
bot = commands.Bot(command_prefix='>', intents=intents)

@bot.command()
async def ping(ctx):
    await ctx.send('pong')

bot.run('token')

Voice

Voice works over WebRTC (lolka’s voice stack), not Discord’s UDP transport. The required dependencies ship with the base install — nothing extra to add.

The API stays discord.py-compatible — await channel.connect() returns a VoiceClient that speaks lolka’s WebRTC voice under the hood:

vc = await channel.connect()
vc.play(lolka.FFmpegPCMAudio('song.mp3'))

# receive/record other participants' audio (optional):
def on_track(track, user_id, producer_id):
    ...  # track is an aiortc MediaStreamTrack
vc.on_receive_track = on_track

...
await vc.disconnect()

Migrating from discord.py

Already have a discord.py bot? You don’t have to rewrite it — just alias the import:

import lolka as discord
from lolka.ext import commands

# everything below is unmodified discord.py bot code
intents = discord.Intents.default()
intents.message_content = True
bot = commands.Bot(command_prefix='>', intents=intents)

@bot.command()
async def ping(ctx):
    await ctx.send('pong')

bot.run('token')

import lolka as discord covers every discord.Whatever attribute access in your existing code (discord.Client, discord.Intents, discord.Embed, checks, errors, and so on). The only lines that actually need editing are explicit submodule imports, since Python resolves those by real module path rather than by the alias:

  • import discord → import lolka as discord

  • from discord import X → from lolka import X

  • from discord.ext import commands → from lolka.ext import commands

  • from discord import app_commands → from lolka import app_commands

That’s it — the rest of your bot’s code stays exactly as it is.

Metadata

Release files for lolka.py 0.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lolka.py 0.5.1
File Size Uploaded
lolka_py-0.5.1.tar.gz 630.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lolka.py 0.5.1
File Interpreter ABI Platform
lolka_py-0.5.1-py3-none-any.whl Python 3 none any Details

Total release size: 1.4 MB

Release files / lolka_py-0.5.1.tar.gz

Download URL lolka_py-0.5.1.tar.gz
Size 630.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9fa11cab214204f101ddf3088214196478a6c8403bf7f21924bbec021000c317
BLAKE2b-256 checksum
How to use checksums
160628d0d912b77d0d68c062a33a62e45c528da90f4aba11ba4694924beeb646
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 1, 2026.

Transparency log

Release files / lolka_py-0.5.1-py3-none-any.whl

Download URL lolka_py-0.5.1-py3-none-any.whl
Size 755.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c810f418586c804d3585a9e0b4f7343f4c2d3fa6313d08fe2dcbf66ccdfa9a36
BLAKE2b-256 checksum
How to use checksums
f7e63acfee30e7479f053f05de8109872411cf3f98366eab222e2b10d78a2007
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jul 1, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.5.1 This release

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page