commands fixes

This commit is contained in:
Untone 2023-09-06 13:11:40 +03:00
parent 7a4672985f
commit bf9f6d0891
3 changed files with 8 additions and 5 deletions

View File

@ -9,6 +9,9 @@ def handle_command_ask(msg):
r = get_member(chat_id, member_id)
print(r)
m = {}
m['from'] = r['result']['user']
m['chat'] = { 'id': chat_id }
show_request_msg(m)
if 'result' in r:
m['from'] = r['result']['user']
m['chat'] = { 'id': str(chat_id) }
show_request_msg(m)
elif 'error_code' in r:
print(r)

View File

@ -1,5 +1,5 @@
from tgbot.storage import Profile, scan
from tgbot.api import get_member, send_message
from tgbot.api import get_member, send_message, get_chat_administrators
from tgbot.utils.mention import userdata_extract

View File

@ -33,7 +33,7 @@ def show_request_msg(msg):
)
else:
print('show button without photo')
r = send_photo(
r = send_message(
chat_id,
newcomer_message + mention(msg['from']),
reply_to=msg.get('message_id', ''),