diff --git a/analysis.py b/src/analysis.py similarity index 100% rename from analysis.py rename to src/analysis.py diff --git a/bot.py b/src/bot.py similarity index 98% rename from bot.py rename to src/bot.py index 0354e3f..3115ce7 100644 --- a/bot.py +++ b/src/bot.py @@ -142,7 +142,7 @@ async def plant(update: Update, context: ContextTypes.DEFAULT_TYPE): validating.add(sha) else: logger.info(f"> Channel not validated, asking again for validation.") - await update.message.reply_text("(看了一下好像频道信息还没有更新的样子... 确定加上了吗?再试试吧)") + return await update.message.reply_text("(看了一下好像频道信息还没有更新的样子... 确定加上了吗?再试试吧)") async def water_callback(update: Update, context: ContextTypes.DEFAULT_TYPE): @@ -204,7 +204,8 @@ async def treehole_callback(update: Update, context: ContextTypes.DEFAULT_TYPE): ) user_states[user_id] = {"action": "treehole", "channel": channel} await query.answer("请查看 bot 的私聊~", show_alert=False) - except Exception: + except Exception as e: + logger.error(f"Failed to send treehole message: {e}") await query.answer("请先私聊 bot 发送 /start 才能使用树洞功能哦~", show_alert=True) diff --git a/bot_disabled.py b/src/bot_disabled.py similarity index 100% rename from bot_disabled.py rename to src/bot_disabled.py diff --git a/db.py b/src/db.py similarity index 100% rename from db.py rename to src/db.py diff --git a/gen_static.py b/src/gen_static.py similarity index 100% rename from gen_static.py rename to src/gen_static.py diff --git a/gentree.py b/src/gentree.py similarity index 100% rename from gentree.py rename to src/gentree.py diff --git a/utils.py b/src/utils.py similarity index 100% rename from utils.py rename to src/utils.py