From 1fe2fa1cac3ef3b23482d04c70f40a7f6212caf8 Mon Sep 17 00:00:00 2001 From: thekindlyone Date: Sun, 7 Aug 2016 02:42:13 +0530 Subject: [PATCH] docstrings on event handlers that instruct to subclass if needed --- fbchat/client.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/fbchat/client.py b/fbchat/client.py index f2fc605..6c8ebce 100644 --- a/fbchat/client.py +++ b/fbchat/client.py @@ -488,24 +488,39 @@ class Client(object): def on_message(self, mid, author_id, author_name, message, metadata): + ''' + subclass Client and override this method to add custom behavior on event + ''' self.markAsDelivered(author_id, mid) self.markAsRead(author_id) print("%s said: %s"%(author_name, message)) def on_typing(self, author_id): + ''' + subclass Client and override this method to add custom behavior on event + ''' pass def on_read(self, author, reader, time): + ''' + subclass Client and override this method to add custom behavior on event + ''' pass def on_inbox(self, viewer, unseen, unread, other_unseen, other_unread, timestamp): + ''' + subclass Client and override this method to add custom behavior on event + ''' pass def on_message_error(self, exception, message): + ''' + subclass Client and override this method to add custom behavior on event + ''' print("Exception: ") print(exception)