mirror of
https://github.com/TeamPGM/PagerMaid-Pyro.git
synced 2024-11-16 11:42:16 +00:00
🔖 Update to v1.2.6
This commit is contained in:
parent
b8a8d1e4af
commit
5d14872bd5
@ -1,4 +1,5 @@
|
||||
import contextlib
|
||||
import sys
|
||||
|
||||
from typing import Callable, Awaitable, Set, Dict
|
||||
|
||||
@ -7,15 +8,12 @@ from datetime import datetime, timezone
|
||||
from logging import getLogger, StreamHandler, CRITICAL, INFO, basicConfig, DEBUG, Formatter, FileHandler
|
||||
from os import getcwd
|
||||
|
||||
from pyrogram.errors import PeerIdInvalid
|
||||
|
||||
from pagermaid.config import Config
|
||||
from pagermaid.scheduler import scheduler
|
||||
import pyromod.listen
|
||||
from pyrogram import Client
|
||||
import sys
|
||||
|
||||
pgm_version = "1.2.5"
|
||||
pgm_version = "1.2.6"
|
||||
CMD_LIST = {}
|
||||
module_dir = __path__[0]
|
||||
working_dir = getcwd()
|
||||
@ -78,5 +76,6 @@ async def log(message):
|
||||
Config.LOG_ID,
|
||||
message
|
||||
)
|
||||
except PeerIdInvalid:
|
||||
except Exception:
|
||||
Config.LOG = False
|
||||
Config.LOG_ID = "me"
|
||||
|
@ -95,4 +95,4 @@ async def recovery(message: Message):
|
||||
os.remove(pgm_backup_zip_name)
|
||||
|
||||
await message.edit(lang('recovery_success') + " " + lang('apt_reboot'))
|
||||
sys.exit(1)
|
||||
sys.exit(0)
|
||||
|
@ -163,17 +163,13 @@ def sudo_filter(permission: str):
|
||||
def from_self(message: Message) -> bool:
|
||||
if message.outgoing:
|
||||
return True
|
||||
if message.from_user:
|
||||
return message.from_user.is_self
|
||||
return False
|
||||
return message.from_user.is_self if message.from_user else False
|
||||
|
||||
|
||||
def from_msg_get_sudo_uid(message: Message) -> int:
|
||||
""" Get the sudo uid from the message. """
|
||||
from_id = message.from_user.id if message.from_user else message.sender_chat.id
|
||||
if from_id in get_sudo_list():
|
||||
return from_id
|
||||
return message.chat.id
|
||||
return from_id if from_id in get_sudo_list() else message.chat.id
|
||||
|
||||
|
||||
def check_manage_subs(message: Message) -> bool:
|
||||
|
@ -1,4 +1,4 @@
|
||||
pyrogram==2.0.35
|
||||
pyrogram==2.0.38
|
||||
TgCrypto>=1.2.3
|
||||
Pillow>=8.4.0
|
||||
pytz>=2021.3
|
||||
@ -8,7 +8,7 @@ psutil>=5.8.0
|
||||
httpx
|
||||
apscheduler
|
||||
sqlitedict
|
||||
casbin==1.16.11
|
||||
mixpanel
|
||||
casbin==1.17.0
|
||||
mixpanel==4.10.0
|
||||
mixpanel-py-async
|
||||
sentry-sdk==1.9.0
|
||||
sentry-sdk==1.9.4
|
||||
|
Loading…
Reference in New Issue
Block a user