parent
cca6d804dc
commit
5c339af0b6
@ -194,9 +194,12 @@ async def ship(context):
|
||||
else:
|
||||
await context.edit(lang('arg_error'))
|
||||
return
|
||||
await context.edit(f"**{lang('ship_hint')}(((**\n"
|
||||
f"[{target_1.first_name}](tg://user?id={target_1.id}) + "
|
||||
f"[{target_2.first_name}](tg://user?id={target_2.id}) = ❤️")
|
||||
try:
|
||||
await context.edit(f"**{lang('ship_hint')}(((**\n"
|
||||
f"[{target_1.first_name}](tg://user?id={target_1.id}) + "
|
||||
f"[{target_2.first_name}](tg://user?id={target_2.id}) = ❤️")
|
||||
except AttributeError:
|
||||
await context.edit(lang('ship_BaseException'))
|
||||
|
||||
|
||||
@listener(is_plugin=False, outgoing=True, command=alias_command("rng"),
|
||||
|
@ -5,7 +5,7 @@ from struct import error as StructError
|
||||
from telethon.tl.functions.messages import GetCommonChatsRequest
|
||||
from telethon.tl.functions.users import GetFullUserRequest
|
||||
from telethon.tl.functions.channels import DeleteUserHistoryRequest
|
||||
from telethon.tl.types import MessageEntityMentionName, ChannelParticipantsAdmins, MessageEntityPhone
|
||||
from telethon.tl.types import MessageEntityMentionName, ChannelParticipantsAdmins, MessageEntityPhone, PeerChannel
|
||||
from telethon.errors.rpcerrorlist import UserAdminInvalidError, ChatAdminRequiredError, FloodWaitError
|
||||
from asyncio import sleep
|
||||
from random import uniform
|
||||
@ -48,12 +48,18 @@ async def span_ban(context):
|
||||
else:
|
||||
await context.edit(lang('arg_error'))
|
||||
return
|
||||
if isinstance(user, PeerChannel):
|
||||
return await context.edit(lang('arg_error'))
|
||||
elif not user:
|
||||
return await context.edit(lang('arg_error'))
|
||||
target_user = await context.client(GetFullUserRequest(user))
|
||||
else:
|
||||
if len(context.parameter) == 1:
|
||||
user = context.parameter[0]
|
||||
if user.isnumeric():
|
||||
user = int(user)
|
||||
if user < 0:
|
||||
return await context.edit(lang('arg_error'))
|
||||
else:
|
||||
await context.edit(lang('arg_error'))
|
||||
return
|
||||
|
Loading…
Reference in New Issue
Block a user