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)
|
r = get_member(chat_id, member_id)
|
||||||
print(r)
|
print(r)
|
||||||
m = {}
|
m = {}
|
||||||
m['from'] = r['result']['user']
|
if 'result' in r:
|
||||||
m['chat'] = { 'id': chat_id }
|
m['from'] = r['result']['user']
|
||||||
show_request_msg(m)
|
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.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
|
from tgbot.utils.mention import userdata_extract
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ def show_request_msg(msg):
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
print('show button without photo')
|
print('show button without photo')
|
||||||
r = send_photo(
|
r = send_message(
|
||||||
chat_id,
|
chat_id,
|
||||||
newcomer_message + mention(msg['from']),
|
newcomer_message + mention(msg['from']),
|
||||||
reply_to=msg.get('message_id', ''),
|
reply_to=msg.get('message_id', ''),
|
||||||
|
|
Loading…
Reference in New Issue
Block a user