forked from saipo/astrbot_plugin_dajiao
Merge pull request '获取本地目录测试' (#48) from QAQ into master
Reviewed-on: saipo/astrbot_plugin_dajiao#48
This commit is contained in:
commit
893bce1805
7
main.py
7
main.py
@ -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("部署")
|
||||
|
Loading…
x
Reference in New Issue
Block a user