import telebot
from telebot import types
from Vocabulary import spisok
from Vocabulary_English import English
import random
bot = telebot.TeleBot('тут токен')
@bot.message_handler(commands=['start'])
def start(message):
markup=types.ReplyKeyboardMarkup()
knopka_start_1=types.KeyboardButton('Русский')
knopka_start_2=types.KeyboardButton('Английський')
markup.add(knopka_start_1,knopka_start_2)
bot.send_message(message.chat.id,'Привет',reply_markup=markup)
@bot.message_handler(content_types=['Text'])
def get_text(message):
get_message_bot = message.text.strip().lover()
if get_message_bot == 'Русский':
bot.send_message(message.chat.id,random.sample(spisok,k=1,counts=None))
def proverka_slova(message):
bot.message_handler(content_types=['text'])
for i1 in English:
if i1 == message.text:
bot.send_message(message.chat.id,'+')
else:
bot.send_message(message.chat.id,"-")
elif get_message_bot == 'Английський':
bot.send_message(message.chat.id,random.sample(English,k=1,counts=None))
def proverka_slova(message):
bot.message_handler(content_types=['text'])
for i2 in spisok:
if i2 == message.text:
bot.send_message(message.chat.id,'+')
else:
bot.send_message(message.chat.id,"-")
bot.polling(none_stop=True)