This commit is contained in:
HibiKier
2022-03-01 20:26:11 +08:00
parent 53b375b4b2
commit 12f55800b0
542 changed files with 173 additions and 152 deletions
+2 -2
View File
@@ -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,
-1
View File
@@ -62,6 +62,5 @@ requests_manager: Optional[RequestManager] = RequestManager(
DATA_PATH / "manager" / "requests_manager.json"
)
# 管理员命令管理器
admin_manager = AdminManager()
+8 -7
View File
@@ -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,
+4
View File
@@ -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]: