mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-03 02:30:01 +08:00
x
This commit is contained in:
@@ -367,7 +367,7 @@ class BuildImage:
|
||||
|
||||
async def atext(
|
||||
self,
|
||||
pos: Tuple[int, int],
|
||||
pos: Union[Tuple[int, int], Tuple[float, float]],
|
||||
text: str,
|
||||
fill: Union[str, Tuple[int, int, int]] = (0, 0, 0),
|
||||
center_type: Optional[Literal["center", "by_height", "by_width"]] = None,
|
||||
@@ -385,7 +385,7 @@ class BuildImage:
|
||||
|
||||
def text(
|
||||
self,
|
||||
pos: Tuple[int, int],
|
||||
pos: Union[Tuple[int, int], Tuple[float, float]],
|
||||
text: str,
|
||||
fill: Union[str, Tuple[int, int, int]] = (0, 0, 0),
|
||||
center_type: Optional[Literal["center", "by_height", "by_width"]] = None,
|
||||
|
||||
@@ -62,6 +62,5 @@ requests_manager: Optional[RequestManager] = RequestManager(
|
||||
DATA_PATH / "manager" / "requests_manager.json"
|
||||
)
|
||||
|
||||
|
||||
# 管理员命令管理器
|
||||
admin_manager = AdminManager()
|
||||
|
||||
@@ -17,13 +17,14 @@ class Plugins2settingsManager(StaticData):
|
||||
if file.exists():
|
||||
with open(file, "r", encoding="utf8") as f:
|
||||
self._data = yaml.load(f)
|
||||
if "PluginSettings" in self._data.keys():
|
||||
self._data = (
|
||||
self._data["PluginSettings"] if self._data["PluginSettings"] else {}
|
||||
)
|
||||
for x in self._data.keys():
|
||||
if self._data[x].get("cost_gold") is None:
|
||||
self._data[x]["cost_gold"] = 0
|
||||
if self._data:
|
||||
if "PluginSettings" in self._data.keys():
|
||||
self._data = (
|
||||
self._data["PluginSettings"] if self._data["PluginSettings"] else {}
|
||||
)
|
||||
for x in self._data.keys():
|
||||
if self._data[x].get("cost_gold") is None:
|
||||
self._data[x]["cost_gold"] = 0
|
||||
|
||||
def add_plugin_settings(
|
||||
self,
|
||||
|
||||
@@ -150,6 +150,10 @@ def poke(qq: int) -> MessageSegment:
|
||||
return MessageSegment("poke", {"qq": qq})
|
||||
|
||||
|
||||
def music(type_: str, id_: int) -> MessageSegment:
|
||||
return MessageSegment.music(type_, id_)
|
||||
|
||||
|
||||
def custom_forward_msg(
|
||||
msg_list: List[str], uin: Union[int, str], name: str = f"这里是{NICKNAME}"
|
||||
) -> List[dict]:
|
||||
|
||||
Reference in New Issue
Block a user