credentials issue

This commit is contained in:
esef committed 2026-07-05 14:46:50 +03:00
1 parent 9d28bfb97f
commit 8c89a46577
2 files changed
+10 -4

No files matched your search

-1
View File
@@ -48,7 +48,6 @@ COLOR_PRESETS: dict[str, int] = {
PANEL_TEXT = (
"**custom roles**\n\n"
"you can give yourself a role with your own name and color. "
"it's purely decorative — no permissions, just looks.\n\n"
"click the button below and the bot will message you to set it up."
)
+10 -3
View File
@@ -5,10 +5,17 @@ import os
class StatChannel(commands.Cog):
def __init__(self, bot):
self.bot = bot
self.channel_id = int(os.getenv('STRINOVA_STAT_CHANNEL_ID'))
self.channel_id_mao = int(os.getenv('STRINOVA_STAT_CHANNEL_ID_MAO'))
def _parse_id(key: str) -> int | None:
val = os.getenv(key, "")
return int(val) if val.isdigit() else None
self.channel_id = _parse_id('STRINOVA_STAT_CHANNEL_ID')
self.channel_id_mao = _parse_id('STRINOVA_STAT_CHANNEL_ID_MAO')
self.update_stat.start()
self.update_stat_mao.start()
if self.channel_id_mao is not None:
self.update_stat_mao.start()
def cog_unload(self):
self.update_stat.cancel()