mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2026-01-02 10:44:50 +00:00
Fix
This commit is contained in:
parent
3244b98ed9
commit
e53ae30a32
2 changed files with 19 additions and 24 deletions
|
|
@ -8,6 +8,7 @@
|
|||
import asyncio
|
||||
import importlib
|
||||
import re
|
||||
import traceback
|
||||
from logging import getLogger
|
||||
|
||||
from pyrogram import __version__, filters, idle
|
||||
|
|
@ -41,7 +42,7 @@ async def start_bot():
|
|||
if hasattr(imported_module, "__MODULE__") and imported_module.__MODULE__:
|
||||
imported_module.__MODULE__ = imported_module.__MODULE__
|
||||
if hasattr(imported_module, "__HELP__") and imported_module.__HELP__:
|
||||
HELPABLE[str(imported_module.__MODULE__).lower()] = imported_module
|
||||
HELPABLE[imported_module.__MODULE__.lower()] = imported_module
|
||||
bot_modules = ""
|
||||
j = 1
|
||||
for i in ALL_MODULES:
|
||||
|
|
@ -358,8 +359,9 @@ if __name__ == "__main__":
|
|||
loop.run_until_complete(start_bot())
|
||||
except KeyboardInterrupt:
|
||||
pass
|
||||
except Exception as err:
|
||||
LOGGER.error(err.with_traceback(None))
|
||||
except Exception:
|
||||
err = traceback.format_exc()
|
||||
LOGGER.error(err)
|
||||
finally:
|
||||
loop.run_until_complete(cleanup())
|
||||
loop.stop()
|
||||
|
|
|
|||
|
|
@ -1,27 +1,20 @@
|
|||
from misskaty import app
|
||||
from logging import getLogger
|
||||
import traceback
|
||||
from misskaty.vars import COMMAND_HANDLER, API_HASH, API_ID
|
||||
from pyrogram import filters, Client
|
||||
from logging import getLogger
|
||||
|
||||
from pyrogram import Client, filters
|
||||
from pyrogram.errors import (ApiIdInvalid, PasswordHashInvalid,
|
||||
PhoneCodeExpired, PhoneCodeInvalid,
|
||||
PhoneNumberInvalid, SessionPasswordNeeded)
|
||||
from pyrogram.types import InlineKeyboardButton, InlineKeyboardMarkup
|
||||
from telethon import TelegramClient
|
||||
from telethon.errors import (ApiIdInvalidError, PasswordHashInvalidError,
|
||||
PhoneCodeExpiredError, PhoneCodeInvalidError,
|
||||
PhoneNumberInvalidError,
|
||||
SessionPasswordNeededError)
|
||||
from telethon.sessions import StringSession
|
||||
from pyrogram.errors import (
|
||||
ApiIdInvalid,
|
||||
PhoneNumberInvalid,
|
||||
PhoneCodeInvalid,
|
||||
PhoneCodeExpired,
|
||||
SessionPasswordNeeded,
|
||||
PasswordHashInvalid
|
||||
)
|
||||
from telethon.errors import (
|
||||
ApiIdInvalidError,
|
||||
PhoneNumberInvalidError,
|
||||
PhoneCodeInvalidError,
|
||||
PhoneCodeExpiredError,
|
||||
SessionPasswordNeededError,
|
||||
PasswordHashInvalidError
|
||||
)
|
||||
|
||||
from misskaty import app
|
||||
from misskaty.vars import API_HASH, API_ID, COMMAND_HANDLER
|
||||
|
||||
LOGGER = getLogger(__name__)
|
||||
|
||||
|
|
@ -200,7 +193,7 @@ async def generate_session(bot, msg, telethon=False, is_bot: bool = False):
|
|||
string_session = client.session.save()
|
||||
else:
|
||||
string_session = await client.export_session_string()
|
||||
text = f"**This is your {ty} String Session** \n\n`{string_session}` \n\n**Generated By :** @{client.me.username}\n🍒 **Note :** Don't share it to anyone. And don't forget to support this owner bot if you like"
|
||||
text = f"**This is your {ty} String Session** \n\n`{string_session}` \n\n**Generated By :** @{client.me.username}\n🍒 **Note :** Don't share it to anyone And don't forget to support this owner bot if you like🥺"
|
||||
try:
|
||||
if not is_bot:
|
||||
await client.send_message("me", text)
|
||||
|
|
|
|||
Loading…
Reference in a new issue