Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 26 additions & 36 deletions csp_bot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,59 +47,49 @@
Channels = GatewayChannels

__all__ = (
# Version
"__version__",
# Chatom re-exports
"Channel",
"Message",
"User",
# Bot
"Backend",
"BaseCommand",
"BaseCommandModel",
"Bot",
# Config
"BotCommand",
"BotConfig",
"DiscordConfig",
"SlackConfig",
"SymphonyConfig",
"TelegramConfig",
# Commands — new framework
"BotInfo",
"BotMessage",
"Channel",
"Channels",
"Command",
"CommandContext",
"CommandModel",
"BotInfo",
"LegacyCommandAdapter",
"command",
# Commands — legacy
"BaseCommand",
"BaseCommandModel",
"CommandVariant",
"CspBotGateway",
"DiscordConfig",
"EchoCommand",
"FsspecStateStore",
"Gateway",
"GatewayChannels",
"GatewayModule",
"GatewaySettings",
"HelpCommand",
"InMemoryStateStore",
"LegacyCommandAdapter",
"Message",
"NoResponseCommand",
"ReplyCommand",
"ReplyToAllCommand",
"ReplyToAuthorCommand",
"ReplyToOtherCommand",
"ScheduleCommand",
"StatusCommand",
# Gateway
"Channels",
"CspBotGateway",
"Gateway",
"GatewayChannels",
"GatewayModule",
"GatewaySettings",
# Persistence
"FsspecStateStore",
"InMemoryStateStore",
"ScheduleStore",
"ScheduledCommandRecord",
"SlackConfig",
"StateStore",
"StatusCommand",
"StoredRecord",
# Structs
"Backend",
"BotCommand",
"BotMessage",
"CommandVariant",
# Utils
"SymphonyConfig",
"TelegramConfig",
"User",
"__version__",
"command",
"format_message",
"get_backend_format",
"is_valid_url",
Expand Down
4 changes: 1 addition & 3 deletions csp_bot/backends/discord.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"""

__all__ = (
"DiscordConfig",
"DiscordAdapter",
"DiscordConfig",
"DiscordMessage",
"DiscordUser",
)
Expand All @@ -24,8 +24,6 @@
class DiscordConfig(BaseModel):
"""Placeholder when chatom.discord is not available."""

pass

DiscordAdapter = None
DiscordMessage = ChatomMessage
DiscordUser = ChatomUser
6 changes: 2 additions & 4 deletions csp_bot/backends/slack.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"""

__all__ = (
"SlackConfig",
"SlackAdapter",
"SlackConfig",
"SlackMessage",
"SlackUser",
"SlackPresenceStatus",
"SlackUser",
)

try:
Expand All @@ -26,8 +26,6 @@
class SlackConfig(BaseModel):
"""Placeholder when chatom.slack is not available."""

pass

SlackAdapter = None
SlackMessage = ChatomMessage
SlackUser = ChatomUser
Expand Down
6 changes: 2 additions & 4 deletions csp_bot/backends/symphony.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
"""

__all__ = (
"SymphonyConfig",
"SymphonyAdapter",
"SymphonyConfig",
"SymphonyMessage",
"SymphonyUser",
"SymphonyPresenceStatus",
"SymphonyUser",
)

try:
Expand All @@ -26,8 +26,6 @@
class SymphonyConfig(BaseModel):
"""Placeholder when chatom.symphony is not available."""

pass

SymphonyAdapter = None
SymphonyMessage = ChatomMessage
SymphonyUser = ChatomUser
Expand Down
4 changes: 1 addition & 3 deletions csp_bot/backends/telegram.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"""

__all__ = (
"TelegramConfig",
"TelegramAdapter",
"TelegramConfig",
"TelegramMessage",
"TelegramUser",
)
Expand All @@ -24,8 +24,6 @@
class TelegramConfig(BaseModel):
"""Placeholder when chatom.telegram is not available."""

pass

TelegramAdapter = None
TelegramMessage = ChatomMessage
TelegramUser = ChatomUser
Loading