Added ghoul module

This commit is contained in:
BarsTiger
2022-09-23 13:59:50 +03:00
parent 79ec0e1ee1
commit 2679d2016a
2 changed files with 28 additions and 0 deletions

View File

@@ -14,6 +14,7 @@ Name Install name Status (dev/ready) Description
TagAll everyone r Tag everyone in chat with @everyone (default) or your message TagAll everyone r Tag everyone in chat with @everyone (default) or your message
FakeHacker hack d 'Hacker' loading message FakeHacker hack d 'Hacker' loading message
YesNo данет r Sends random 'yes' or 'not' message (variants from list) with 50/50 chance 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: ## Repo URL to add:

27
ghoul.py Normal file
View File

@@ -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)