From 50dae01db50cbbad59402a8e227211cc7a3997e5 Mon Sep 17 00:00:00 2001 From: Known_Black_Hat Date: Thu, 11 Jul 2024 01:14:07 +0530 Subject: [PATCH] fix: FontDir object has no attr read --- .gitignore | 1 + mr_robot/__main__.py | 2 ++ mr_robot/exts/greeting.py | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 2598cec..67d300d 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ Servers.inf lavalink_server/logs ip.txt *.db +/logs diff --git a/mr_robot/__main__.py b/mr_robot/__main__.py index d25f85c..4071e33 100644 --- a/mr_robot/__main__.py +++ b/mr_robot/__main__.py @@ -53,6 +53,8 @@ def setup_logging() -> None: logging.getLogger("httpcore").setLevel(logging.WARNING) logging.getLogger("disnake").setLevel(logging.INFO) logging.getLogger("sqlalchemy").setLevel(logging.WARNING) + logging.getLogger("sqlite3").setLevel(logging.WARNING) + logging.getLogger("core").setLevel(logging.WARNING) logging.getLogger("streamlink").disabled = True diff --git a/mr_robot/exts/greeting.py b/mr_robot/exts/greeting.py index d3a666e..bf3cb6d 100644 --- a/mr_robot/exts/greeting.py +++ b/mr_robot/exts/greeting.py @@ -106,7 +106,7 @@ def send_img( outline=theme, width=outline, ) - font = ImageFont.truetype(font_style, 40) + font = ImageFont.truetype(font_style.value, 40) txt = "Welcome" if welcome else "Goodbye" draw.text( (width / 2 + 10, height // 2 + 100 - 50), @@ -126,7 +126,7 @@ def send_img( anchor="mm", ) if message: - font = ImageFont.truetype(font_style, 22) + font = ImageFont.truetype(font_style.value, 22) draw.text( (width / 2 + 10, height // 2 + 140), message,