Files
forust 8a1da13383 Fix all lint issues: Dockerfiles (DL3015/DL3013/DL4006) + Ruff (173→0 errors)
Dockerfile fixes:
- edu_master/phpsessid-bot: add --no-install-recommends, pin pip versions
- edu_master/webinar-checker: pin pip versions with --no-cache-dir
- userbot: add SHELL with pipefail for pipe operations

Ruff fixes (173 → 0):
- W293/W291/W292: whitespace clean via ruff format
- N806: camelCase → snake_case (anilist, safone, hearts, flux, etc.)
- ARG001/ARG002: prefix unused params with _
- SIM115: use context managers for file I/O
- SIM117: combine nested with statements
- S608: noqa on SQL f-strings (module name is validated)
- E402/N812/N817: import fixes
- B023: pass loop variable as argument
- I001: auto-sorted imports
- syntax: fixed = vs == in dtek_notif/main.py
2026-06-21 22:01:51 +02:00

101 lines
1.7 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
from pyrogram import Client, filters
from pyrogram.types import Message
from utils.misc import modules_help, prefix
REPLACEMENT_MAP = {
'a': 'ɐ',
'b': 'q',
'c': 'ɔ',
'd': 'p',
'e': 'ǝ',
'f': 'ɟ',
'g': 'ƃ',
'h': 'ɥ',
'i': 'ᴉ',
'j': 'ɾ',
'k': 'ʞ',
'l': 'l',
'm': 'ɯ',
'n': 'u',
'o': 'o',
'p': 'd',
'q': 'b',
'r': 'ɹ',
's': 's',
't': 'ʇ',
'u': 'n',
'v': 'ʌ',
'w': 'ʍ',
'x': 'x',
'y': 'ʎ',
'z': 'z',
'A': '∀',
'B': 'B',
'C': 'Ɔ',
'D': 'D',
'E': 'Ǝ',
'F': 'Ⅎ',
'G': 'פ',
'H': 'H',
'I': 'I',
'J': 'ſ',
'K': 'K',
'L': '˥',
'M': 'W',
'N': 'N',
'O': 'O',
'P': 'Ԁ',
'Q': 'Q',
'R': 'R',
'S': 'S',
'T': '┴',
'U': '∩',
'V': 'Λ',
'W': 'M',
'X': 'X',
'Y': '⅄',
'Z': 'Z',
'0': '0',
'1': 'Ɩ',
'2': 'ᄅ',
'3': 'Ɛ',
'4': 'ㄣ',
'5': 'ϛ',
'6': '9',
'7': 'ㄥ',
'8': '8',
'9': '6',
',': "'",
'.': '˙',
'?': '¿',
'!': '¡',
'"': ',,',
"'": ',',
'(': ')',
')': '(',
'[': ']',
']': '[',
'{': '}',
'}': '{',
'<': '>',
'>': '<',
'&': '⅋',
'_': '‾',
}
@Client.on_message(filters.command('flip', prefix) & filters.me)
async def flip(_client: Client, message: Message):
text = ' '.join(message.command[1:])
final_str = ''
for char in text:
new_char = REPLACEMENT_MAP.get(char, char)
final_str += new_char
if text != final_str:
await message.edit(final_str)
else:
await message.edit(text)
modules_help['fliptext'] = {'flip [amount]*': 'flip text upside down'}