credentials issue
This commit is contained in:
1 parent
9d28bfb97f
commit
8c89a46577
2 files changed
+9
-3
No files matched your search
@@ -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."
|
||||
)
|
||||
|
||||
|
||||
+9
-2
@@ -5,9 +5,16 @@ 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()
|
||||
if self.channel_id_mao is not None:
|
||||
self.update_stat_mao.start()
|
||||
|
||||
def cog_unload(self):
|
||||
|
||||
Reference in new issue
Block a user