Telethon-MCUB is a maintained Telethon fork for MCUB and userbot-oriented
workloads. The Python import path remains telethon, but the package name
for installation and publishing is Telethon-MCUB.
Install the base package:
pip install -U Telethon-MCUBInstall with optional extras:
pip install -U "Telethon-MCUB[cryptg]"
pip install -U "Telethon-MCUB[socks]"
pip install -U "Telethon-MCUB[media]"
pip install -U "Telethon-MCUB[speedups]"
pip install -U "Telethon-MCUB[all]"Optional extras:
cryptgfor faster encryption/decryption.socksfor proxy support throughpython-socks[asyncio].mediafor image resizing and media metadata extraction viapillowandhachoir.speedupsfor faster gzip handling throughisal.allto install every optional dependency listed above.
from telethon import TelegramClient, events, sync
api_id = 12345
api_hash = "0123456789abcdef0123456789abcdef"
client = TelegramClient("session_name", api_id, api_hash)
client.start()
print(client.get_me().stringify())
client.send_message("username", "Hello from Telethon-MCUB")
@client.on(events.NewMessage(pattern="(?i)hi|hello"))
async def handler(event):
await event.respond("Hey!")- The package is published as
Telethon-MCUB, but existing code should keep importingtelethon. - MCUB-specific changes and release history are tracked in
CHANGELOG.md. - Core Telethon concepts and API documentation are still largely applicable: https://docs.telethon.dev
- Repository: https://github.com/hairpin01/Telethon-MCUB
- Issues: https://github.com/hairpin01/Telethon-MCUB/issues
- MCUB-fork: https://github.com/hairpin01/MCUB-fork
