aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/hydroroll/plugins/plugin_send/__init__.py
diff options
context:
space:
mode:
author简律纯 <i@jyunko.cn>2023-08-13 12:24:45 +0800
committer简律纯 <i@jyunko.cn>2023-08-13 12:24:45 +0800
commit4bf6db5200affc2f623aa02301020092c0789d19 (patch)
tree9f32d49fb967b16a4f4c79bb39bf3ccff6773b9b /hydroroll/plugins/plugin_send/__init__.py
parentc30ca50aab37a86534b3dcd27c253cc79d0c8101 (diff)
downloadHydroRoll-4bf6db5200affc2f623aa02301020092c0789d19.tar.gz
HydroRoll-4bf6db5200affc2f623aa02301020092c0789d19.zip
refactor: 根据tests重构
Diffstat (limited to 'hydroroll/plugins/plugin_send/__init__.py')
-rw-r--r--hydroroll/plugins/plugin_send/__init__.py28
1 files changed, 0 insertions, 28 deletions
diff --git a/hydroroll/plugins/plugin_send/__init__.py b/hydroroll/plugins/plugin_send/__init__.py
deleted file mode 100644
index 2468189..0000000
--- a/hydroroll/plugins/plugin_send/__init__.py
+++ /dev/null
@@ -1,28 +0,0 @@
-import re
-
-from plugins.plugin_base import CommandPluginBase
-
-from .config import Config
-
-
-class Send(CommandPluginBase[None, Config]):
- Config = Config
-
- def __post_init__(self):
- self.re_pattern = re.compile(r"\s*(?P<message>.*)", flags=re.I)
-
- async def handle(self) -> None:
- try:
- await self.event.adapter.send(
- self.msg_match.group("message"),
- "private",
- self.config.send_user_id,
- )
- except Exception as e:
- if self.config.send_filed_msg is not None:
- await self.event.reply(
- self.format_str(self.config.send_filed_msg, repr(e))
- )
- else:
- if self.config.send_success_msg is not None:
- await self.event.reply(self.format_str(self.config.send_success_msg))