Как в функции вызвать другую функцию?
@bot.message_handler(func=lambda message: True)
def echo_message(message):
text = message.text
global flag
global filmCode
chat_id = message.chat.id
if flag == False:
if text == "Бот":
check(call)**ТУТ ВЫЗОВ ФУНКЦИИ**
bot.send_message(chat_id, "#", reply_markup=start_markup())
else:
check(call)**ТУТ ВЫЗОВ ФУНКЦИИ**
bot.send_message(chat_id, "#", reply_markup=start_markup())
else:
check(call)**ТУТ ВЫЗОВ ФУНКЦИИ**
def check(call):
status = ['creator', 'administrator', 'member']
global flag
for i in status:
if i == bot.get_chat_member(chat_id="-1001983985312",user_id=call.message.chat.id).status:
flag = True
print(flag)
check2(call)
break
else:
bot.send_message(call.message.chat.id, "#", reply_markup=start_markup())
flag = False
Нудно вызвать функцию check(call), написав в функции echo_message check(call) Выдает ошибку "NameError: name 'call' is not defined"
Источник: Stack Overflow на русском