Create a channel
Declare it in the app
Handle messages once
The same@app.message() handler can serve web chat and named channels.
Serve with a channel
--force-channel when you need to rebind a local channel binding.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Connect external message transports to a Capsule app.
capsule channel create support-telegram --type telegram -c bot_token=123:ABC
app = cpsl.App(
name="support-ops",
image=cpsl.Image(),
channels=[cpsl.Channel("support-telegram")],
)
@app.message() handler can serve web chat and named channels.
@app.message()
async def handle(session: cpsl.Session, msg: cpsl.Message):
await session.reply(
f"Received on {session.channel.type}: {msg.text}"
)
capsule serve app.py:app --channel support-telegram
--force-channel when you need to rebind a local channel binding.
capsule channel list
capsule channel info support-telegram
capsule channel bind support-telegram --app support-ops
capsule channel unbind support-telegram