mirror of
https://github.com/Nezumi-2711/astrbot_plugin_qq_group_daily_analysis.git
synced 2026-09-22 20:01:04 +00:00
fix(ruff)
This commit is contained in:
@@ -161,7 +161,6 @@ class TelegramAdapter(PlatformAdapter):
|
|||||||
logger.warning("无法从 bot_instance 获取 Telegram 客户端")
|
logger.warning("无法从 bot_instance 获取 Telegram 客户端")
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
# ==================== IMessageRepository ====================
|
# ==================== IMessageRepository ====================
|
||||||
|
|
||||||
async def fetch_messages(
|
async def fetch_messages(
|
||||||
@@ -299,7 +298,7 @@ class TelegramAdapter(PlatformAdapter):
|
|||||||
# 尝试从 bot 实例获取
|
# 尝试从 bot 实例获取
|
||||||
if hasattr(self.bot, "meta") and callable(self.bot.meta):
|
if hasattr(self.bot, "meta") and callable(self.bot.meta):
|
||||||
try:
|
try:
|
||||||
meta = self.bot.meta() # type: ignore
|
meta = self.bot.meta() # type: ignore
|
||||||
if hasattr(meta, "id"):
|
if hasattr(meta, "id"):
|
||||||
return str(getattr(meta, "id", "telegram"))
|
return str(getattr(meta, "id", "telegram"))
|
||||||
except Exception:
|
except Exception:
|
||||||
|
|||||||
Reference in New Issue
Block a user