mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-07 12:24:51 +00:00
Format code with black (#4)
* reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black * reformating: code * Format code with black Co-authored-by: yasirarism <mail@yasir.eu.org> Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
This commit is contained in:
parent
8a263e46af
commit
758ca8a2c4
4 changed files with 8 additions and 9 deletions
|
|
@ -16,7 +16,7 @@ from misskaty import (
|
||||||
BOT_USERNAME,
|
BOT_USERNAME,
|
||||||
UBOT_ID,
|
UBOT_ID,
|
||||||
UBOT_NAME,
|
UBOT_NAME,
|
||||||
UBOT_USERNAME
|
UBOT_USERNAME,
|
||||||
)
|
)
|
||||||
from misskaty.plugins import ALL_MODULES
|
from misskaty.plugins import ALL_MODULES
|
||||||
from misskaty.helper import paginate_modules
|
from misskaty.helper import paginate_modules
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import os
|
||||||
import traceback
|
import traceback
|
||||||
import asyncio
|
import asyncio
|
||||||
from pyrogram import filters, enums
|
from pyrogram import filters, enums
|
||||||
from misskaty import app, user
|
from misskaty import app
|
||||||
from misskaty.vars import COMMAND_HANDLER, SUDO
|
from misskaty.vars import COMMAND_HANDLER, SUDO
|
||||||
|
|
||||||
__MODULE__ = "DevCommand"
|
__MODULE__ = "DevCommand"
|
||||||
|
|
|
||||||
|
|
@ -159,10 +159,12 @@ async def translate(client, message):
|
||||||
target_lang = message.text.split(None, 2)[1]
|
target_lang = message.text.split(None, 2)[1]
|
||||||
text = message.text.split(None, 2)[2]
|
text = message.text.split(None, 2)[2]
|
||||||
msg = await message.reply("Menerjemahkan...")
|
msg = await message.reply("Menerjemahkan...")
|
||||||
my_translator = GoogleTranslator(source='auto', target=target_lang)
|
my_translator = GoogleTranslator(source="auto", target=target_lang)
|
||||||
try:
|
try:
|
||||||
result = my_translator.translate(text=text)
|
result = my_translator.translate(text=text)
|
||||||
await msg.edit(f"Translation using source = {my_translator.source} and target = {my_translator.target}\n\n-> {result}")
|
await msg.edit(
|
||||||
|
f"Translation using source = {my_translator.source} and target = {my_translator.target}\n\n-> {result}"
|
||||||
|
)
|
||||||
except MessageTooLong:
|
except MessageTooLong:
|
||||||
url = await rentry(tekstr.text)
|
url = await rentry(tekstr.text)
|
||||||
await msg.edit(
|
await msg.edit(
|
||||||
|
|
|
||||||
|
|
@ -3,17 +3,14 @@ import shutil
|
||||||
import tempfile
|
import tempfile
|
||||||
import asyncio
|
import asyncio
|
||||||
import re
|
import re
|
||||||
import math
|
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
from misskaty.helper.http import http
|
from misskaty.helper.http import http
|
||||||
from pyrogram import filters, emoji, enums
|
from pyrogram import emoji, filters
|
||||||
from pyrogram.errors import PeerIdInvalid, StickersetInvalid, BadRequest
|
from pyrogram.errors import PeerIdInvalid, StickersetInvalid, BadRequest
|
||||||
from pyrogram.raw.functions.messages import GetStickerSet, SendMedia
|
from pyrogram.raw.functions.messages import GetStickerSet, SendMedia
|
||||||
from pyrogram.raw.functions.stickers import AddStickerToSet, CreateStickerSet
|
from pyrogram.raw.functions.stickers import AddStickerToSet, CreateStickerSet
|
||||||
from pyrogram.types import Message, InlineKeyboardButton, InlineKeyboardMarkup
|
from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
|
||||||
from typing import Tuple, Callable
|
|
||||||
from functools import wraps, partial
|
|
||||||
from pyrogram.raw.types import (
|
from pyrogram.raw.types import (
|
||||||
DocumentAttributeFilename,
|
DocumentAttributeFilename,
|
||||||
InputDocument,
|
InputDocument,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue