diff options
| author | 2023-05-02 23:30:19 +0800 | |
|---|---|---|
| committer | 2023-05-02 23:30:19 +0800 | |
| commit | dfa97c9d24b8124ca38ec5eb605cde932cd6ea78 (patch) | |
| tree | 470a8bfd1960964b8c9724c19de876cf52cf60c3 /hydroroll/plugins/HydroRoll_plugin_luck/__init__.py | |
| parent | 45c49007ee01143ad26899751b856658321cd3ae (diff) | |
| download | HydroRoll-dfa97c9d24b8124ca38ec5eb605cde932cd6ea78.tar.gz HydroRoll-dfa97c9d24b8124ca38ec5eb605cde932cd6ea78.zip | |
Diffstat (limited to 'hydroroll/plugins/HydroRoll_plugin_luck/__init__.py')
| -rw-r--r-- | hydroroll/plugins/HydroRoll_plugin_luck/__init__.py | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/hydroroll/plugins/HydroRoll_plugin_luck/__init__.py b/hydroroll/plugins/HydroRoll_plugin_luck/__init__.py deleted file mode 100644 index a30c964..0000000 --- a/hydroroll/plugins/HydroRoll_plugin_luck/__init__.py +++ /dev/null @@ -1,21 +0,0 @@ -import re -import time -import random - -from plugins.hydroroll_plugin_base import CommandPluginBase - -from .config import Config - - -class Luck(CommandPluginBase[None, Config]): - Config = Config - - def __post_init__(self): - self.re_pattern = re.compile(r".*", flags=re.I) - - async def handle(self) -> None: - random.seed( - time.strftime("%Y%j", time.localtime()) + self.format_str("{user_id}") - ) - lucy = random.randint(self.config.min_int, self.config.max_int) - await self.event.reply(self.format_str(self.config.message_str, str(lucy))) |
