ignore = {}
@bot.message_handler(content_types=['text'])
def get_text_messages(message):
if ignore.get(message.chat.id):
if message.text == "Жмал включись":
ignore.pop(message.chat.id)
else:
if message.text == "Жмал выключись":
ignore[message.chat.id] = True
elif ...:
...
[ [{"text": ..., "callback_data": "...."}, {"text": ..., "callback_data": "...."}, {"text": ..., "callback_data": "...."}] ]
[ [{"text": ..., "callback_data": "...."}], [{"text": ..., "callback_data": "...."}], [{"text": ..., "callback_data": "...."}] ]
if message.from_user.id in [...список кому нужна дополнительная кнопка...]
markup =....
item_hy = ....
markup.add(item_hi)
bot.send_message(call.message.chat.id, "Всё окей")
bot.send_message(call.message.chat.id, "Нажми ещё эту", reply_markup=markup)
bot.send_message(message.chat.id, 'Your code: ' + password)
password = ''.join([str(random.randint(0, 9)) for x in range(length)])
for n in range(number):
password = ''
for i in range(length):
password += random.choice(chars)
bot.register_next_step_handler(message, process_name_step)
def process_name_step(message)
Acces_to_cmd = [273747, 2848, ...]
If message.author.id in Acces_to_cmd:
If role in user.roles: