mirror of
https://github.com/yasirarism/MissKatyPyro.git
synced 2025-12-29 09:44:50 +00:00
Incase group is using old setting for nightmode, so it will unlock all permission
Signed-off-by: Yasir Aris M <git@yasirdev.my.id>
This commit is contained in:
parent
693e1e3fe2
commit
171afc0f4a
2 changed files with 4 additions and 1 deletions
|
|
@ -42,7 +42,7 @@ MOD_NOLOAD = ["subscene_dl"]
|
||||||
HELPABLE = {}
|
HELPABLE = {}
|
||||||
cleanmode = {}
|
cleanmode = {}
|
||||||
botStartTime = time.time()
|
botStartTime = time.time()
|
||||||
misskaty_version = "v2.11.3 - Stable"
|
misskaty_version = "v2.11.4 - Stable"
|
||||||
|
|
||||||
uvloop.install()
|
uvloop.install()
|
||||||
faulthandler_enable()
|
faulthandler_enable()
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
import platform
|
import platform
|
||||||
import re
|
import re
|
||||||
from datetime import datetime, timedelta
|
from datetime import datetime, timedelta
|
||||||
|
from attr import Attribute
|
||||||
|
|
||||||
import pytz
|
import pytz
|
||||||
from apscheduler.jobstores.base import ConflictingIdError
|
from apscheduler.jobstores.base import ConflictingIdError
|
||||||
|
|
@ -105,6 +106,8 @@ async def un_mute_chat(chat_id: int, perm: ChatPermissions):
|
||||||
getlang = getlang or "en-US"
|
getlang = getlang or "en-US"
|
||||||
try:
|
try:
|
||||||
await app.set_chat_permissions(chat_id, perm)
|
await app.set_chat_permissions(chat_id, perm)
|
||||||
|
except AttributeError:
|
||||||
|
await app.set_chat_permissions(chat_id, ChatPermissions(all_perms=True))
|
||||||
except ChatAdminRequired:
|
except ChatAdminRequired:
|
||||||
await app.send_message(
|
await app.send_message(
|
||||||
LOG_CHANNEL,
|
LOG_CHANNEL,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue