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.3.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.3-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: cordless-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 c5244fa622a461fbd08086b164c83ab0918b57ff781c824519688b1706b65bc4
MD5 7c5993f63f4c5a7aabcbeff6e23fd8c9
BLAKE2b-256 32992581367334a5230ee98b3f9b7df4546aeb536cce6fa08535d1b5948924d0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: cordless-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 535588098450417966a9cf0ada09ccd20f255e96ca818551bfc741da6c71c554
MD5 12362a92977d19d523a34aaa16b0a5f9
BLAKE2b-256 a9f3ee7dbeca811e0d0aef6d2541e0307edc5ca8398bb148c1124dd65e3d8d9f

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