Add Notification module to notify the user about the message.

main
KKlochko 1 year ago
parent 1bd5fd5145
commit cc5148cee5

@ -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:

@ -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()
Loading…
Cancel
Save