From 9810fcf19fbd2908c507a6f5a4e71abea716cc8b Mon Sep 17 00:00:00 2001 From: Rykov7 Date: Sun, 12 Feb 2023 07:22:51 +0300 Subject: [PATCH] add rus commands --- app/bot.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/app/bot.py b/app/bot.py index 687f469..f0be4a4 100644 --- a/app/bot.py +++ b/app/bot.py @@ -82,7 +82,7 @@ def send_lutz(message): caption="вот, не позорься") -@bot.message_handler(commands=['bdmtss']) +@bot.message_handler(commands=['bdmtss', 'бдмтсс']) def send_bdmtss_audio(message): bot.send_voice(message.chat.id, 'AwACAgIAAxkBAAIJrWOg2WUvLwrf7ahyJxQHB8_nqllwAAL5JQAC2_IJSbhfQIO5YnVmLAQ') @@ -96,7 +96,7 @@ def translate_layout(message): bot.send_message(message.chat.id, message.reply_to_message.text.translate(ENG_RUS_TABLE)) -@bot.message_handler(commands=['quote']) +@bot.message_handler(commands=['quote', 'цитата']) def stan_speak(message): bot.send_message(message.chat.id, stan.speak(0)) @@ -108,7 +108,7 @@ def send_tsya(message: types.Message): send_or_reply(message, '-тся и -ться в глаголах', reply_markup=markup) -@bot.message_handler(commands=['nometa']) +@bot.message_handler(commands=['nometa', 'номета']) def send_nometa(message: types.Message): markup = types.InlineKeyboardMarkup() markup.add(types.InlineKeyboardButton('❓ nometa.xyz', url='https://nometa.xyz/ru.html'), row_width=1) @@ -127,7 +127,7 @@ def send_neprivet(message: types.Message): send_or_reply(message, 'Пожалуйста, не пишите просто «Привет» в чате.', reply_markup=markup) -@bot.message_handler(commands=['nojob']) +@bot.message_handler(commands=['nojob', 'ноджоб']) def send_nojob(message): logging.warning('Sent no job') answer = """Мы здесь не для того, чтобы за тебя решать задачи. @@ -136,21 +136,21 @@ def send_nojob(message): send_or_reply(message, answer) -@bot.message_handler(commands=['nobot']) +@bot.message_handler(commands=['nobot', 'нобот']) def nobot(message: types.Message): answer = """Внимание: Телеграм бот не должен быть твоим первым проектом на Python. Пожалуйста, изучи основы Python, работу с модулями, основы веб-технологий, асинхронное программирование и отладку до начала работы с Телеграм ботами. Существует много ресурсов для этого в интернете.""" send_or_reply(message, answer) -@bot.message_handler(commands=['nogui']) +@bot.message_handler(commands=['nogui', 'ногуи']) def nogui(message: types.Message): answer = """Внимание: GUI приложение не должно быть твоим первым проектом на Python. Пожалуйста, изучи основы Python, работу с модулями, циклы событий и отладку до начала работы с какими-либо GUI-фреймворками. Существует много ресурсов для этого в интернете.""" send_or_reply(message, answer) -@bot.message_handler(commands=['g']) +@bot.message_handler(commands=['g', 'г']) def google_it(message: types.Message): """ Google it! """ query = f'{detect_args(message)}'