Files
limoka/Ruslan-Isaev/modules/Figlet.py
2025-07-10 21:02:34 +03:00

30 lines
873 B
Python
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# meta developer: @RUIS_VlP
# requires: pyfiglet
import random
from telethon import functions
from telethon.tl.types import Message
from .. import loader, utils
import pyfiglet
@loader.tds
class FigletMod(loader.Module):
"""Длинные слова лучше переносить на другую строчку. Пример:
`.figlet Hello
World!`
Если написать в одну строчку, то слово не уместится в одно сообщение """
strings = {
"name": "Figlet",
}
def init(self):
self.name = self.strings["name"]
@loader.command()
async def figlet(self, message: Message):
"""<text> - делает текст большим"""
mtext = message.text[8:]
ftext = pyfiglet.figlet_format(mtext)
await utils.answer(message, f"<code>{ftext}</code>")