aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsalmonik <raisersoft@proton.me>2026-04-19 15:43:42 +0200
committersalmonik <raisersoft@proton.me>2026-04-19 15:43:42 +0200
commit5afc066f035eda2b38f0ebe0cdd802d1a7a6a64a (patch)
tree9603ed3b86467a2a740705bc2d2a7965a18188c0
parentrefactor: simplify cogs, reduce complexity (diff)
downloadsenator-sperma-5afc066f035eda2b38f0ebe0cdd802d1a7a6a64a.tar.gz
senator-sperma-5afc066f035eda2b38f0ebe0cdd802d1a7a6a64a.zip
chore: add pycord dependency, update main
Diffstat (limited to '')
-rw-r--r--main.py15
m---------pycord0
2 files changed, 7 insertions, 8 deletions
diff --git a/main.py b/main.py
index 6c8c35b..1f5e3f6 100644
--- a/main.py
+++ b/main.py
@@ -19,11 +19,17 @@ from cogs.utils import settings
19def setup_logging(debug: bool = False): 19def setup_logging(debug: bool = False):
20 """Configure logging based on debug flag.""" 20 """Configure logging based on debug flag."""
21 level = logging.DEBUG if debug else logging.INFO 21 level = logging.DEBUG if debug else logging.INFO
22
23 class DecryptionFilter(logging.Filter):
24 def filter(self, record):
25 return "Decryption failed" not in record.getMessage()
26
22 logging.basicConfig( 27 logging.basicConfig(
23 level=level, 28 level=level,
24 format="%(levelname)s - %(filename)s - %(name)s - %(message)s", 29 format="%(levelname)s - %(filename)s - %(name)s - %(message)s",
25 handlers=[logging.StreamHandler(sys.stdout)], 30 handlers=[logging.StreamHandler(sys.stdout)],
26 ) 31 )
32 logging.getLogger().addFilter(DecryptionFilter())
27 33
28 34
29# Create a new event loop and set it as the current loop 35# Create a new event loop and set it as the current loop
@@ -39,12 +45,6 @@ async def on_ready():
39 logger = logging.getLogger(__name__) 45 logger = logging.getLogger(__name__)
40 logger.info("ŁUKASZ SPERMA AKTYWACJA") 46 logger.info("ŁUKASZ SPERMA AKTYWACJA")
41 47
42 channel_id = os.getenv("STATUS_CHANNEL_ID")
43 if channel_id:
44 channel = bot.get_channel(int(channel_id))
45 if channel:
46 await channel.send("ŁUKASZ SPERMA AKTYWACJA")
47
48 await settings.load_settings() 48 await settings.load_settings()
49 49
50 50
@@ -74,7 +74,6 @@ if __name__ == "__main__":
74 "cogs.trigger", 74 "cogs.trigger",
75 "cogs.cron", 75 "cogs.cron",
76 "cogs.qr", 76 "cogs.qr",
77 "cogs.plot",
78 "cogs.voice", 77 "cogs.voice",
79 ] 78 ]
80 79
@@ -93,4 +92,4 @@ if __name__ == "__main__":
93 92
94 except Exception as e: 93 except Exception as e:
95 logging.getLogger(__name__).error(f"Error starting the bot: {e}") 94 logging.getLogger(__name__).error(f"Error starting the bot: {e}")
96 sys.exit(1) \ No newline at end of file 95 sys.exit(1)
diff --git a/pycord b/pycord
new file mode 160000
Subproject 3dd5306672933c9ea2cd995fc3f5daf28f10551