This commit is contained in:
@@ -13,6 +13,14 @@ class Config:
|
|||||||
logger.info("Конфигурация успешно загружена.")
|
logger.info("Конфигурация успешно загружена.")
|
||||||
|
|
||||||
def _load_replies(self, file_path: str = "storage/replies.txt"):
|
def _load_replies(self, file_path: str = "storage/replies.txt"):
|
||||||
|
script_ad_reply = [
|
||||||
|
o.strip()
|
||||||
|
for o in str(
|
||||||
|
"Скрипт для авто-раздачи :da: [ad][UNFURL]https://lolz.team/threads/10187517/[/UNFURL][/ad] || Сиськи, сливы 18+ [ad][UNFURL]https://lolz.team/threads/10187517/[/UNFURL][/ad] || Твой помощник для авто-раздачи :animeyessir: [ad][UNFURL]https://lolz.team/threads/10187517/[/UNFURL][/ad]"
|
||||||
|
).split(" || ")
|
||||||
|
]
|
||||||
|
default_replies = [["✓"], script_ad_reply]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
reply_lines = []
|
reply_lines = []
|
||||||
with open(file_path, "r", encoding="utf-8") as replies:
|
with open(file_path, "r", encoding="utf-8") as replies:
|
||||||
@@ -24,12 +32,14 @@ class Config:
|
|||||||
options = [o.strip() for o in line.split(" || ")]
|
options = [o.strip() for o in line.split(" || ")]
|
||||||
else:
|
else:
|
||||||
options = [line]
|
options = [line]
|
||||||
reply_lines.append(options)
|
|
||||||
|
|
||||||
return reply_lines if reply_lines else [["✓"]]
|
reply_lines.append(options)
|
||||||
|
reply_lines.append(script_ad_reply)
|
||||||
|
|
||||||
|
return reply_lines if reply_lines else default_replies
|
||||||
|
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
return [["✓"]]
|
return default_replies
|
||||||
|
|
||||||
def _load(self):
|
def _load(self):
|
||||||
load_dotenv()
|
load_dotenv()
|
||||||
|
|||||||
Reference in New Issue
Block a user