stricter timing
This commit is contained in:
4
main.py
4
main.py
@@ -50,7 +50,7 @@ def create_embed(message: str) -> dict:
|
|||||||
"""
|
"""
|
||||||
msg = get_message(message)
|
msg = get_message(message)
|
||||||
embed = {
|
embed = {
|
||||||
"title": "Notification",
|
"title": message.capitalize(),
|
||||||
"description": msg["text"],
|
"description": msg["text"],
|
||||||
"color": msg["color"],
|
"color": msg["color"],
|
||||||
"timestamp": time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime()),
|
"timestamp": time.strftime("%Y-%m-%dT%H:%M:%SZ", time.gmtime()),
|
||||||
@@ -100,7 +100,7 @@ def main() -> None:
|
|||||||
try:
|
try:
|
||||||
while True:
|
while True:
|
||||||
schedule.run_pending()
|
schedule.run_pending()
|
||||||
time.sleep(30) # Check every 30 seconds
|
time.sleep(1) # Check every second
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
logging.info("Scheduler stopped by user")
|
logging.info("Scheduler stopped by user")
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|||||||
Reference in New Issue
Block a user