-
Notifications
You must be signed in to change notification settings - Fork 1
API Reference
github-actions[bot] edited this page Jul 31, 2025
·
3 revisions
DiscordAdapterConfig
requires:
-
token
: Discord Bot Token
See Setup for more information.
DiscordAdapterManager
takes a single argument config
, an instance of DiscordAdapterConfig
.
It provides two methods:
-
subscribe() -> ts[[DiscordMessage]]
: Subscribe to messages (DiscordMessage
) from channels in which the Bot is present, and DMs -
publish(ts[DiscordMessage])
: Publish messages (DiscordMessage
)
Note
subscribe
returns a list of DiscordMessage
, but publish
takes an individual DiscordMessage
.
This is for API symmetry with the csp-adapter-symphony.
csp.unroll
can be used to unroll the list of ts[List[DiscordMessage]]
into ts[DiscordMessage]
.
from csp_adapter_discord import DiscordAdapterConfig, DiscordAdapterManager
def graph():
adapter = DiscordAdapterManager(
config=DiscordMessage(token="YOUR TOKEN"),
)
csp.print("All Messages", adapter.subscribe())
See Examples for more examples.
csp-chat
is a framework for writing cross-platform, command oriented chat bots.
It will be released in 2025 with initial support for Slack
, Symphony
, and Discord
.
This wiki is autogenerated. To made updates, open a PR against the original source file in docs/wiki
.
Get Started
Developer Guide