Add Notification module to notify the user about the message.

This commit is contained in:
2023-12-12 18:08:11 +02:00
parent 1bd5fd5145
commit cc5148cee5
2 changed files with 14 additions and 0 deletions
+3
View File
@@ -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:
+11
View File
@@ -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()