获取本地目录测试 #48

Merged
QAQ merged 1 commits from QAQ into master 2025-05-24 13:17:19 +08:00
Showing only changes of commit d1d6307dc0 - Show all commits

View File

@ -7,6 +7,7 @@ from .back import time_long, volume, isUserExist, insertUser, seconds_to_hms, ml
import pymysql
import matplotlib
import matplotlib.pyplot as plt
import os
from .Tool import get_tool_name
import astrbot.api.message_components as Comp
from astrbot.core.utils.session_waiter import (
@ -402,7 +403,11 @@ class MyPlugin(Star):
@filter.command("本地目录测试")
async def Juno(self, event: AstrMessageEvent):
yield event.plain_result("本地目录测试:")
yield event.image_result("path/to/M.png") # 发送图片
file_path = os.path.abspath(__file__)
yield event.plain_result(file_path)
dir_path = os.path.dirname(file_path)
yield event.plain_result(dir_path)
yield event.image_result(dir_path + "/M.png") # 发送图片
@filter.command("部署")