parent
3fb0578995
commit
0cc112f316
@ -169,6 +169,8 @@ async def profile(context):
|
||||
await context.edit(lang('profile_process'))
|
||||
if context.reply_to_msg_id:
|
||||
reply_message = await context.get_reply_message()
|
||||
if not reply_message:
|
||||
return await context.edit(f"{lang('error_prefix')}{lang('arg_error')}")
|
||||
user = reply_message.from_id
|
||||
target_user = await context.client(GetFullUserRequest(user))
|
||||
else:
|
||||
|
@ -190,11 +190,15 @@ async def highlight(context):
|
||||
await context.edit(lang('caption_error'))
|
||||
return
|
||||
await context.edit(lang('highlight_uploading'))
|
||||
try:
|
||||
await context.client.send_file(
|
||||
context.chat_id,
|
||||
result,
|
||||
reply_to=reply_id
|
||||
)
|
||||
except PhotoInvalidDimensionsError:
|
||||
await context.edit(lang('caption_error'))
|
||||
return
|
||||
await context.delete()
|
||||
|
||||
|
||||
|
@ -16,6 +16,14 @@ from pagermaid.listener import listener
|
||||
from pagermaid.utils import lang, alias_command
|
||||
|
||||
|
||||
def isfloat(value):
|
||||
try:
|
||||
float(value)
|
||||
return True
|
||||
except ValueError:
|
||||
return False
|
||||
|
||||
|
||||
@listener(is_plugin=False, outgoing=True, command=alias_command("id"),
|
||||
description=lang('id_des'))
|
||||
async def userid(context):
|
||||
@ -213,6 +221,8 @@ async def feet2meter(context):
|
||||
if not len(context.parameter) == 1:
|
||||
await context.edit(lang('arg_error'))
|
||||
return
|
||||
if not isfloat(context.parameter[0]):
|
||||
return await context.edit(lang('re_arg_error'))
|
||||
feet = float(context.parameter[0])
|
||||
meter = feet * .3048
|
||||
await context.edit(f"{lang('m2f_get')} {str(feet)} {lang('m2f_feet')}{lang('m2f_convert_to')} {str(meter)} "
|
||||
|
Loading…
Reference in New Issue
Block a user