diff --git a/README.md b/README.md index 9dd41e4..09c4fb5 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ Name Install name Status (dev/ready) Description TagAll everyone r Tag everyone in chat with @everyone (default) or your message FakeHacker hack d 'Hacker' loading message YesNo данет r Sends random 'yes' or 'not' message (variants from list) with 50/50 chance +Ghoul ghoul r 1000-7 with settings ^^ ``` ## Repo URL to add: diff --git a/ghoul.py b/ghoul.py new file mode 100644 index 0000000..1c790cc --- /dev/null +++ b/ghoul.py @@ -0,0 +1,27 @@ +import asyncio +import argparse +from .. import loader, utils + + +@loader.tds +class GhoulMod(loader.Module): + """Я гуль""" + strings = {"name": "Ghoul"} + + async def ghoulcmd(self, message: utils.Message): + """-res <текст в конце (optional)> -max <максимальное (то есть минимальное) отрицательное число, до котрого + дойдет (optional)> """ + parser = argparse.ArgumentParser() + parser.add_argument('-res', type=str, required=False, default='Я гуль!') + parser.add_argument('-max', type=int, required=False, default=0) + + args_s = utils.get_args_raw(message) + args = parser.parse_args(args_s.split() if args_s else None) + + i = 1000 + while i > args.max: + await message.edit(f"{i} - 7 = {i - 7}") + i -= 7 + await asyncio.sleep(0.1) + + await message.edit(args.res)