Skip to content

Commit

Permalink
修复导入错误变量名的NUG
Browse files Browse the repository at this point in the history
  • Loading branch information
chiupam committed Sep 29, 2021
1 parent e37080b commit d161396
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions beta/diy/check_getcookie.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@

from telethon import events

from .. import chat_id, jdbot, logger, JD_DIR, CONFIG_DIR, ch_name, BOT_SET
from .. import chat_id, jdbot, logger, BOT_DIR, CONFIG_DIR, ch_name, BOT_SET


@jdbot.on(events.NewMessage(from_users=chat_id, pattern=r'^/getcookie$'))
async def getcookiefile(event):
try:
fname = "getcookie.py"
doit = True
if os.path.exists(f'{JD_DIR}/bot/{fname}') or os.path.exists(f'{JD_DIR}/diy/{fname}'):
if os.path.exists(f'{BOT_DIR}/bot/{fname}') or os.path.exists(f'{BOT_DIR}/diy/{fname}'):
doit = False
if doit:
msg = f'请找到一份 {fname} 文件并发送给机器人,选择存储在 {CONFIG_DIR} 目录中,随后执行以下命令\n/cmd mv {CONFIG_DIR}/{fname} {JD_DIR}/diy'
msg = f'请找到一份 {fname} 文件并发送给机器人,选择存储在 {CONFIG_DIR} 目录中,随后执行以下命令\n/cmd mv {CONFIG_DIR}/{fname} {BOT_DIR}/diy'
await jdbot.send_message(chat_id, msg)
except Exception as e:
title = "【💥错误💥】"
Expand Down

0 comments on commit d161396

Please sign in to comment.