discord_channel
discord_channel
¶
DiscordChannel — native Discord Bot API adapter.
Classes¶
DiscordChannel
¶
DiscordChannel(
bot_token: str = "", *, bus: Optional[EventBus] = None
)
Bases: BaseChannel
Native Discord channel adapter using the Discord REST API.
| PARAMETER | DESCRIPTION |
|---|---|
bot_token
|
Discord bot token. Falls back to
TYPE:
|
bus
|
Optional event bus for publishing channel events.
TYPE:
|
Source code in src/diapason/channels/discord_channel.py
Methods:¶
connect
¶
Start listening for incoming messages via discord.py gateway.
Source code in src/diapason/channels/discord_channel.py
disconnect
¶
Stop the listener thread.
Source code in src/diapason/channels/discord_channel.py
send
¶
send(
channel: str,
content: str,
*,
conversation_id: str = "",
metadata: Dict[str, Any] | None = None,
) -> bool
Send a message to a Discord channel via REST API.
Source code in src/diapason/channels/discord_channel.py
status
¶
status() -> ChannelStatus