mirror of
https://github.com/Nezumi-2711/astrbot_plugin_qq_group_daily_analysis.git
synced 2026-09-22 20:01:04 +00:00
fix(DiscordAdapter): 修复 Base64 图片解码时缺少 import base64 的问题
This commit is contained in:
@@ -400,6 +400,7 @@ class DiscordAdapter(PlatformAdapter):
|
||||
if image_path.startswith("base64://"):
|
||||
# Base64 图片:解码 -> 内存 Object -> Discord
|
||||
from io import BytesIO
|
||||
import base64 # Fix: Ensure base64 is imported
|
||||
try:
|
||||
base64_data = image_path.split("base64://")[1]
|
||||
image_bytes = base64.b64decode(base64_data)
|
||||
|
||||
Reference in New Issue
Block a user