From 243890371445c01990543bc007f0b14f65fcf27a Mon Sep 17 00:00:00 2001 From: Sirod3v Date: Mon, 16 Dec 2024 19:50:14 +0900 Subject: [PATCH 1/5] =?UTF-8?q?style:=20=EB=A1=9C=EA=B1=B0=20=EC=B6=9C?= =?UTF-8?q?=EB=A0=A5=20=ED=98=95=EC=8B=9D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/logging.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/logging.py b/utils/logging.py index 8ce603a..2bb3935 100644 --- a/utils/logging.py +++ b/utils/logging.py @@ -30,6 +30,6 @@ def format(self, record: logging.LogRecord): def setup_logging(): formatter = HighlightingFormatter("{asctime} {levelname} {name}: {message}", "%Y-%m-%d %H:%M:%S", "{") - handler = logging.StreamHandler() + handler = logging.StreamHandler(sys.stdout) handler.setFormatter(formatter) logging.basicConfig(handlers=[handler], level=logging.INFO) From 70da337f6875db1438788f09e1ff7fd762d4ceac Mon Sep 17 00:00:00 2001 From: Sirod3v Date: Mon, 16 Dec 2024 20:01:54 +0900 Subject: [PATCH 2/5] =?UTF-8?q?chore:=20=EB=B2=84=EC=A0=84=20=EC=97=85,=20?= =?UTF-8?q?=EC=83=81=ED=83=9C=20=EB=A9=94=EC=8B=9C=EC=A7=80=205=EC=B4=88?= =?UTF-8?q?=EB=A7=88=EB=8B=A4=20=EA=B0=B1=EC=8B=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 8f004d5..e3d28b6 100644 --- a/main.py +++ b/main.py @@ -25,10 +25,15 @@ async def on_ready(): logger.info(f"Logged in as {bot.user.name}") logger.info(f"Be used in {guild_count} guilds.") + bot.change_status.start() + + +@tasks.loop(seconds=5) +async def change_status(): await bot.change_presence( status=discord.Status.online, - activity=discord.Game(f"버전 0.0.0 - {guild_count}개의 서버에서 작동 중"), - ) + activity=discord.Game(f"버전 0.1.0 - {len(bot.guilds)}개의 서버에서 작동 중"), + ) # Timer From 72c8c9af02637ede4f2effd65dcad0654fd83d75 Mon Sep 17 00:00:00 2001 From: Sirod3v Date: Mon, 16 Dec 2024 20:06:28 +0900 Subject: [PATCH 3/5] fix: import sys --- utils/logging.py | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/logging.py b/utils/logging.py index 2bb3935..0f57b5a 100644 --- a/utils/logging.py +++ b/utils/logging.py @@ -1,4 +1,5 @@ import logging +import sys RESET = "\033[0m" CYAN = "\033[1;36m" From 996583bdc521ee6b99495279e8f7f3ca27e228eb Mon Sep 17 00:00:00 2001 From: Sirod3v Date: Mon, 16 Dec 2024 20:07:54 +0900 Subject: [PATCH 4/5] fix: import tasks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 이시림왜모듈을안가져오나요 --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index e3d28b6..8bbcddc 100644 --- a/main.py +++ b/main.py @@ -3,7 +3,7 @@ import dotenv import logging import utils.logging -from discord.ext import commands +from discord.ext import commands, tasks import time from asyncio import sleep import pickle From d08749d916b2e26a7b8ccf175fd33593559b3223 Mon Sep 17 00:00:00 2001 From: Sirod3v Date: Mon, 16 Dec 2024 20:10:47 +0900 Subject: [PATCH 5/5] =?UTF-8?q?fix:=20=EC=9E=98=EB=AA=BB=20=EA=B0=80?= =?UTF-8?q?=EB=A6=AC=ED=82=A8=20Attribute=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 8bbcddc..d5fb231 100644 --- a/main.py +++ b/main.py @@ -25,7 +25,7 @@ async def on_ready(): logger.info(f"Logged in as {bot.user.name}") logger.info(f"Be used in {guild_count} guilds.") - bot.change_status.start() + change_status.start() @tasks.loop(seconds=5)