Skip to main content

Serverless Discord interactions framework for AWS Lambda

Project description

📡 Cordless

A serverless Discord interactions framework for AWS Lambda

Cordless lets you build Discord bots without running a server — just functions, deployed to Lambda.

No WebSockets. No stateful runtime. No gateway sharding.

Just HTTP → functions → responses.


✨ Why Cordless?

Traditional Discord bots require:

  • persistent servers
  • WebSocket connections
  • intent configuration
  • runtime state management

Cordless flips that model:

Discord sends events → AWS Lambda runs your code → you return a response


⚡ Core idea

Discord Interaction → API Gateway → AWS Lambda → Cordless Router → Your Functions → JSON Response back to Discord


🚀 Quickstart

Install

pip install cordless

Create your first bot

from cordless import Cordless

bot = Cordless()

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

Lambda entry point

from cordless import Cordless

bot = Cordless()

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

def handler(event, context):
    return bot.handle(event)

🧩 Commands

@bot.command("hello")
async def hello(ctx):
    await ctx.send("Hello world!")

🔘 Buttons

Send a button:

from cordless.ui import Button

@bot.command("ping")
async def ping(ctx):
    await ctx.send(
        "pong",
        components=[
            Button(label="Edit", custom_id="edit_ping")
        ]
    )

Handle button clicks:

@bot.button("edit_ping")
async def edit_ping(ctx):
    await ctx.edit("edited")

🧠 Key concepts

Stateless by design:

  • interaction payload
  • custom_id routing
  • Lambda invocation context

No WebSocket required.


📦 Architecture

cordless ├── app.py ├── router.py ├── context.py ├── response/ └── adapters/

💡 Philosophy

Cordless is built around one idea:

Discord apps should feel like serverless functions, not servers.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cordless-0.1.1.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cordless-0.1.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file cordless-0.1.1.tar.gz.

File metadata

  • Download URL: cordless-0.1.1.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for cordless-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7417325f3f473f212b7bb1ffc10ff70f90c9f4f6c8a11abac2516b76d56c4763
MD5 94b58e5fe7a206aedaa2a33a0e66b258
BLAKE2b-256 fde704b45a412f05872f7b3e5e4eea4a09796c4a04ada9baa2769ac5024f1ef7

See more details on using hashes here.

File details

Details for the file cordless-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: cordless-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for cordless-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5f53f2aa8a0f70b0cf61ae789165afcbee8bca7dc720c374a52eb463e451ca46
MD5 66864f06b6ae1924b7b76617682d4818
BLAKE2b-256 317f5d99bc46176d97cc1c0cd6fdd9b43f438078d0f884d387c15796f70f0a6a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page