commands fixes
This commit is contained in:
parent
7a4672985f
commit
bf9f6d0891
|
@ -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)
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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', ''),
|
||||
|
|
Loading…
Reference in New Issue
Block a user