diff --git a/notification_client/client.py b/notification_client/client.py index 154d639..755b4c4 100644 --- a/notification_client/client.py +++ b/notification_client/client.py @@ -20,6 +20,7 @@ import asyncio import struct from notification_client.MessagePrinter import MessagePrinter +from notification_client.notitication import Notification class Client: @@ -47,6 +48,8 @@ class Client: MessagePrinter.print(title, message) + Notification.notify(title, message) + except asyncio.CancelledError: print('Something went wrong') finally: diff --git a/notification_client/notitication.py b/notification_client/notitication.py new file mode 100644 index 0000000..3fd1c43 --- /dev/null +++ b/notification_client/notitication.py @@ -0,0 +1,11 @@ +from notifypy import Notify + + +class Notification: + @staticmethod + def notify(title: str, message: str): + notification = Notify() + notification.title = title + notification.message = message + notification.send() +