diff options
| author | 2023-05-02 23:30:19 +0800 | |
|---|---|---|
| committer | 2023-05-02 23:30:19 +0800 | |
| commit | dfa97c9d24b8124ca38ec5eb605cde932cd6ea78 (patch) | |
| tree | 470a8bfd1960964b8c9724c19de876cf52cf60c3 /tests/plugins/exc.py | |
| parent | 45c49007ee01143ad26899751b856658321cd3ae (diff) | |
| download | HydroRoll-dfa97c9d24b8124ca38ec5eb605cde932cd6ea78.tar.gz HydroRoll-dfa97c9d24b8124ca38ec5eb605cde932cd6ea78.zip | |
Diffstat (limited to 'tests/plugins/exc.py')
| -rw-r--r-- | tests/plugins/exc.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/plugins/exc.py b/tests/plugins/exc.py new file mode 100644 index 0000000..7e453ed --- /dev/null +++ b/tests/plugins/exc.py @@ -0,0 +1,16 @@ +from iamai import Plugin
+import os
+class Exec(Plugin):
+ async def handle(self) -> None:
+ from hydroroll.config import ConfigManager, GlobalConfig
+ tmpConf = ConfigManager(os.path.join(GlobalConfig._current_path, "config", "userConf.dat"))
+ tmpConf.load()
+ await self.event.reply(str(tmpConf.properties))
+
+
+ async def rule(self) -> bool:
+ if self.event.adapter.name != "cqhttp":
+ return False
+ if self.event.type != "message":
+ return False
+ return self.event.message.startswith("t")
\ No newline at end of file |
