Skip to main content

Cascade

High-performance Discord selfbot library for Python. Built for speed, stealth, and reliability.

Features

  • Blazing Fast: Optimized for maximum performance with async/await
  • Stealthy: Mimics official Discord client behavior to avoid detection
  • Full-Featured: Complete gateway, REST API, and event system
  • Smart Caching: Intelligent caching system for optimal memory usage
  • Type-Safe: Full type hints throughout the codebase
  • Extensible: Plugin system for custom commands and features

Quick Start

import asyncio
import cascade

async def main():
    session = cascade.Session('YOUR_TOKEN')
    
    @session.event
    async def on_ready(user):
        print(f'Logged in as {user.username}')
    
    @session.event
    async def on_message(message):
        if message.content == '!ping':
            await session.rest.send_message(message.channel_id, 'Pong!')
    
    await session.start()

asyncio.run(main())

Advanced Usage

Commands Framework

from cascade.ext.commands import Bot

bot = Bot(command_prefix='!', self_bot=True)

@bot.command()
async def ping(ctx):
    await ctx.send(f'Pong! {bot.session.gateway.latency:.2f}ms')

await bot.start('YOUR_TOKEN')

Smart Features

async with cascade.TypingIndicator(session.rest, channel_id):
    await process_long_task()
    await session.rest.send_message(channel_id, 'Done!')

results = await session.rest.search_channel_messages(
    channel_id,
    query='keyword',
    author_id=user_id
)

profile = await session.rest.get_user_profile(user_id)
connections = await session.rest.get_user_connections()
settings = await session.rest.get_user_settings()

Permissions & Safety

from cascade import Permission, Permissions

perms = Permissions()
perms.add(Permission.SEND_MESSAGES, Permission.READ_MESSAGE_HISTORY)

if perms.has(Permission.ADMINISTRATOR):
    print('User has admin')

Installation

pip install cascade

Performance

  • Gateway: Sub-millisecond message handling
  • REST: Smart rate limiting with automatic retry
  • Cache: LRU caching with TTL support
  • Memory: Optimized for low memory footprint

Architecture

cascade/
├── core/           # Core session, cache, events
├── gateway/        # WebSocket gateway handling
├── api/            # REST API client
├── entities/       # Discord entities (User, Guild, Message, etc.)
├── types/          # Enums and type definitions
├── utils/          # Utilities (permissions, formatting, validation)
└── ext/            # Extensions (commands framework)

Capabilities

  • Full gateway connection with auto-reconnect
  • Complete REST API coverage (100+ endpoints)
  • User account features (notes, relationships, settings)
  • Guild management (roles, channels, members)
  • Message handling (send, edit, delete, search, reactions)
  • Thread support (create, join, manage)
  • Voice state updates
  • Stage instances and scheduled events
  • Webhooks and integrations
  • Rich presence and activities
  • Advanced search and filtering
  • Bulk operations
  • Smart markdown processing
  • Permission calculations

Examples

Check the examples/ directory for:

  • basic.py - Simple bot setup
  • commands.py - Command framework usage
  • advanced.py - Advanced features
  • moderation.py - Moderation utilities

Warning

Selfbots are against Discord's Terms of Service. Use at your own risk.

License

MIT.

⚠️ Warning

Automating user accounts violates Discord's Terms of Service and can result in account termination. This library is for educational purposes only. Use at your own risk.

Features

  • Async/await with aiohttp and websockets
  • Full gateway connection with automatic reconnection
  • Event-driven architecture
  • REST API with intelligent rate limiting
  • Built-in caching system
  • Complete entity models (User, Guild, Channel, Message, etc.)
  • Command framework
  • Type hints throughout
  • Zero comments, clean professional code

Installation

pip install -e .

Quick Start

import cascade

client = cascade.Session('your_token_here')

@client.event
async def on_ready():
    print(f'Logged in as {client.user.name}')

@client.event
async def on_message(message):
    if message.content == '!ping':
        await message.channel.send('Pong!')

client.run()

Command Framework

from cascade.ext.commands import Bot

bot = Bot('your_token_here', command_prefix='!')

@bot.command()
async def hello(ctx):
    await ctx.send(f'Hello {ctx.author.name}!')

@bot.command()
async def say(ctx, *args):
    await ctx.send(' '.join(args))

bot.run()

Examples

Change Presence

from cascade import Activity, ActivityType

activity = Activity.playing('with Python')
await client.change_presence(status='dnd', activity=activity)

Message Formatting

from cascade.utils.formatting import bold, code, codeblock

await channel.send(bold('Bold text'))
await channel.send(code('inline code'))
await channel.send(codeblock('print("hello")', 'python'))

License

MIT

Metadata

Release files for cascade-discord 0.1.0

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

Source distribution (sdist)

Source distribution for cascade-discord 0.1.0
File Size Uploaded Provenance
cascade_discord-0.1.0.tar.gz 41.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for cascade-discord 0.1.0
File Interpreter ABI Platform
cascade_discord-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 92.0 kB

Release files / cascade_discord-0.1.0.tar.gz

Download URL cascade_discord-0.1.0.tar.gz
Size 41.0 kB
Tags Source
SHA-256 checksum
How to use checksums
94479e8937c5a60250ae04d12d03ab589a16eab1173e38e0c369237cb7fcfa7e
BLAKE2b-256 checksum
How to use checksums
4a996a07f0c633b2637bba01982d9fe36af95058acc4182a4b0e6d895617739c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.5

Release files / cascade_discord-0.1.0-py3-none-any.whl

Download URL cascade_discord-0.1.0-py3-none-any.whl
Size 51.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
50c6529392e6279fe74f7c595314ea06e665dd49a578d4658ef3c05ca687342d
BLAKE2b-256 checksum
How to use checksums
738b898ca8d6fed66301616016ccbe4562ac7ed4c7411c6f7b815a856910c1e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.5

Security for cascade-discord 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

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