Улучшение

This commit is contained in:
2025-08-21 15:35:15 +07:00
parent b79ffcf7d1
commit 68196bf9a5

View File

@@ -1,14 +1,16 @@
import os
TOKENS: dict[str, str] = {} TOKENS: dict[str, str] = {}
with open("secrets/TOKEN_KrekAdminBot.txt") as file: token_files = {
TOKENS = {'KrekAdminBot': file.read()} 'KrekAdminBot': "secrets/TOKEN_KrekAdminBot.txt",
'KrekFunBot': "secrets/TOKEN_KrekFunBot.txt",
'KrekRimagochiBot': "secrets/TOKEN_KrekRimagochiBot.txt",
'KrekSupBot': "secrets/TOKEN_KrekSupBot.txt",
'KrekModBot': "secrets/TOKEN_KrekModBot.txt"
}
with open("secrets/TOKEN_KrekFunBot.txt") as file: for bot, path in token_files.items():
TOKENS = {'KrekFunBot': file.read()} if os.path.exists(path):
with open(path, "r") as file:
with open("secrets/TOKEN_KrekRimagochiBot.txt") as file: TOKENS = {bot: file.read()}
TOKENS = {'KrekRimagochiBot': file.read()}
with open("secrets/TOKEN_KrekSupBot.txt") as file:
TOKENS = {'KrekSupBot': file.read()}