From e379266201352ab91045fd186afd5679d52d2bb4 Mon Sep 17 00:00:00 2001 From: Alishahryar1 Date: Fri, 30 Jan 2026 14:09:22 -0800 Subject: [PATCH] Updated readme --- README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/README.md b/README.md index 2dc9c745..3362a844 100644 --- a/README.md +++ b/README.md @@ -162,3 +162,34 @@ class MyProvider(BaseProvider): # Convert to Anthropic response format pass ``` + +### Adding Your Own Messaging App + +Extend `MessagingPlatform` in `messaging/` to add support for other platforms (Discord, Slack, etc.): + +```python +from messaging.base import MessagingPlatform +from messaging.models import IncomingMessage + +class MyPlatform(MessagingPlatform): + async def start(self): + # Initialize connection + pass + + async def stop(self): + # Cleanup + pass + + async def queue_send_message(self, chat_id, text, **kwargs): + # Send message to platform + pass + + async def queue_edit_message(self, chat_id, message_id, text, **kwargs): + # Edit existing message + pass + + def on_message(self, handler): + # Register callback for incoming messages + # Handler expects an IncomingMessage object + pass +```