another fixes
This commit is contained in:
+8
-6
@@ -37,12 +37,14 @@ class Messages:
|
|||||||
) # несколько сообщений подряд
|
) # несколько сообщений подряд
|
||||||
]
|
]
|
||||||
HELPS = [
|
HELPS = [
|
||||||
"Доступные команды:" "\n/start - начать регистрацию",
|
(
|
||||||
"\n/help - помощь",
|
"Доступные команды:"
|
||||||
"\n/source - исходный код бота на Github",
|
"\n/start - начать регистрацию"
|
||||||
"\n@more_logical - для всех вопросов по мероприятию",
|
"\n/help - помощь"
|
||||||
"\n\nCreated by АйТи блок ВМК with love ❤️",
|
"\n/source - исходный код бота на Github"
|
||||||
# "Начало мероприятия: {} \nЭто через целых {} минут!",
|
"\n@more_logical - для всех вопросов по мероприятию"
|
||||||
|
"\n\nCreated by АйТи блок ВМК with love ❤️"
|
||||||
|
)
|
||||||
]
|
]
|
||||||
|
|
||||||
ERROR = "Произошла ошибка"
|
ERROR = "Произошла ошибка"
|
||||||
|
|||||||
+5
-3
@@ -62,7 +62,7 @@ def help_message(message: types.Message):
|
|||||||
for msg in Messages.HELPS:
|
for msg in Messages.HELPS:
|
||||||
bot.send_message(message.chat.id, msg)
|
bot.send_message(message.chat.id, msg)
|
||||||
else:
|
else:
|
||||||
bot.send_message(message.chat.id, AdminMessages.ADMIN_HELP, parse_mode="HTML")
|
bot.send_message(message.chat.id, AdminMessages.ADMIN_HELP)
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -71,8 +71,10 @@ def help_message(message: types.Message):
|
|||||||
def source(message: types.Message):
|
def source(message: types.Message):
|
||||||
bot.send_message(
|
bot.send_message(
|
||||||
message.chat.id,
|
message.chat.id,
|
||||||
"[Страничка бота на Github!](https://github.com/kr0sh512/rc-tgbot)\n\nСтарался раб профкомский [Дмитрий](https://t.me/kr0sh_512). mewow.",
|
(
|
||||||
parse_mode="Markdown",
|
"<a href='https://github.com/kr0sh512/rc-tgbot'>Страничка бота на Github!</a>"
|
||||||
|
"\n\nСтарался раб профкомский <a href='https://t.me/kr0sh_512'>Дмитрий</a>. mewow."
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -152,7 +152,6 @@ class Admin:
|
|||||||
bot.send_message(
|
bot.send_message(
|
||||||
message.chat.id,
|
message.chat.id,
|
||||||
"Ваш ключ: <code>{}</code>".format(key),
|
"Ваш ключ: <code>{}</code>".format(key),
|
||||||
parse_mode="HTML",
|
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
bot.send_message(message.chat.id, str(e))
|
bot.send_message(message.chat.id, str(e))
|
||||||
@@ -253,7 +252,6 @@ class Admin:
|
|||||||
bot.send_message(
|
bot.send_message(
|
||||||
message.chat.id,
|
message.chat.id,
|
||||||
"Отправьте <code>delete all</code> для подтверждения. \n\nВнимание, вы вряд ли хотите это делать.",
|
"Отправьте <code>delete all</code> для подтверждения. \n\nВнимание, вы вряд ли хотите это делать.",
|
||||||
parse_mode="HTML",
|
|
||||||
)
|
)
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ telebot.TeleBot.send_message = send_message_with_try_catch
|
|||||||
bot = telebot.TeleBot(
|
bot = telebot.TeleBot(
|
||||||
config.API_TOKEN,
|
config.API_TOKEN,
|
||||||
colorful_logs=True,
|
colorful_logs=True,
|
||||||
|
parse_mode="HTML",
|
||||||
)
|
)
|
||||||
|
|
||||||
threading.Thread(
|
threading.Thread(
|
||||||
|
|||||||
@@ -152,6 +152,7 @@ def test_question(call: types.CallbackQuery):
|
|||||||
text_edit,
|
text_edit,
|
||||||
call.message.chat.id,
|
call.message.chat.id,
|
||||||
call.message.message_id,
|
call.message.message_id,
|
||||||
|
parse_mode="HTML",
|
||||||
) # упростить
|
) # упростить
|
||||||
|
|
||||||
if len(user.type) == 4:
|
if len(user.type) == 4:
|
||||||
|
|||||||
+1
-1
@@ -10,7 +10,7 @@ class TestMessages:
|
|||||||
"question": "Когда вы оказываетесь в новой компании людей, вы, как правило:",
|
"question": "Когда вы оказываетесь в новой компании людей, вы, как правило:",
|
||||||
"answers": [
|
"answers": [
|
||||||
(
|
(
|
||||||
"<u><b>Легко заводите разговоры с разными людьми.</b></u>",
|
"<u><b>Легко заводите разговоры с разными людьми</b></u>.",
|
||||||
"E",
|
"E",
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
|
|||||||
+1
-1
@@ -132,7 +132,7 @@ class User:
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
def start_shuffle_reg():
|
def start_shuffle_reg():
|
||||||
users_reg.clear()
|
users_reg.clear()
|
||||||
users = [user for user in User.get_all() if len(user.type) == 4]
|
users = [user for user in User.get_all() if (user.type and len(user.type) == 4)]
|
||||||
|
|
||||||
markup = types.InlineKeyboardMarkup()
|
markup = types.InlineKeyboardMarkup()
|
||||||
markup.add(
|
markup.add(
|
||||||
|
|||||||
Reference in New Issue
Block a user