Skip to content
This repository was archived by the owner on Dec 20, 2021. It is now read-only.

Commit 7aee88f

Browse files
committed
on_unhandled_event hooks
1 parent 274d065 commit 7aee88f

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

examples/async/WebSocket Client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ async def on_friend_online(self, friend):
1818
async def on_notification(self, notification):
1919
print("Got a {} notification from {}.".format(notification.type, notification.senderUsername))
2020

21+
async def on_unhandled_event(self, event, content):
22+
print("Recieved unhandled event '{}'.".format(event))
23+
2124
async def wait_loop(self):
2225
await self.login2fa(input("Username: "), input("Password: "), input("2FA Code: "), True)
2326

examples/sync/WebSocket Client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ def on_friend_online(self, friend):
1717
def on_notification(self, notification):
1818
print("Got a {} notification from {}.".format(notification.type, notification.senderUsername))
1919

20+
def on_unhandled_event(self, event, content):
21+
print("Recieved unhandled event '{}'.".format(event))
22+
2023
def wait_loop(self):
2124
self.login2fa(input("Username: "), input("Password: "), input("2FA Code: "), True)
2225

0 commit comments

Comments
 (0)