From 4bf6db5200affc2f623aa02301020092c0789d19 Mon Sep 17 00:00:00 2001 From: 简律纯 Date: Sun, 13 Aug 2023 12:24:45 +0800 Subject: refactor: 根据tests重构 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hydroroll/plugins/plugin_bot/__init__.py | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 hydroroll/plugins/plugin_bot/__init__.py (limited to 'hydroroll/plugins/plugin_bot/__init__.py') diff --git a/hydroroll/plugins/plugin_bot/__init__.py b/hydroroll/plugins/plugin_bot/__init__.py deleted file mode 100644 index 89ba17b..0000000 --- a/hydroroll/plugins/plugin_bot/__init__.py +++ /dev/null @@ -1,30 +0,0 @@ -import re -from importlib.metadata import version -from plugins.plugin_base import CommandPluginBase -from hydroroll.config import GlobalConfig - -from .config import Config - - -class HydroBot(CommandPluginBase[None, Config]): - Config = Config - CurrentConfig = GlobalConfig - priority = 0 - - def __post_init__(self): - self.re_pattern = re.compile(r"(?P.*)", flags=re.I) - - def bot_info(self): - info_str = f'{self.CurrentConfig._name} '\ - f'{self.CurrentConfig._version}({self.CurrentConfig._svn}) '\ - f'by {self.CurrentConfig._author} '\ - f'on Python {self.CurrentConfig._python_ver_raw} '\ - f'with {" & ".join([adapter + "("+version("iamai-adapter-"+adapter) +")" for adapter in dict(self.bot.config.adapter)])} '\ - f'for iamai({self.CurrentConfig._iamai_version})' - - return info_str - - async def handle(self) -> None: - await self.event.reply( - self.format_str(self.config.message_str, self.bot_info()) - ) -- cgit v1.2.3-70-g09d2