upd arrows
This commit is contained in:
+4
-4
@@ -75,23 +75,23 @@ def send_rules(message):
|
||||
markup.add(RULES, row_width=1)
|
||||
args = message.text.split()
|
||||
if len(args) > 1 and args[-1].isdigit() and 0 < int(args[-1]):
|
||||
send_or_reply(message, f'<b>Правило {args[-1]}</b>\n<i>{rules.get_rule(args[-1])}</i>', reply_markup=markup)
|
||||
send_or_reply(message, f'<b>Правило {args[-1]}</b>\n<i>{rules.fetch_rule(args[-1])}</i>', reply_markup=markup)
|
||||
else:
|
||||
send_or_reply(message, 'Почитай...', reply_markup=markup)
|
||||
send_or_reply(message, '⤵️', reply_markup=markup)
|
||||
|
||||
|
||||
@bot.message_handler(commands=['faq', 'чзв'])
|
||||
def send_faq(message):
|
||||
markup = types.InlineKeyboardMarkup()
|
||||
markup.add(FAQ, row_width=1)
|
||||
send_or_reply(message, 'Почитай...', reply_markup=markup)
|
||||
send_or_reply(message, '⤵️', reply_markup=markup)
|
||||
|
||||
|
||||
@bot.message_handler(commands=['lib', 'library', 'books', 'книги', 'библиотека'])
|
||||
def send_lib(message):
|
||||
markup = types.InlineKeyboardMarkup()
|
||||
markup.add(LIB, row_width=1)
|
||||
send_or_reply(message, 'Советую', reply_markup=markup)
|
||||
send_or_reply(message, '⤵️', reply_markup=markup)
|
||||
|
||||
|
||||
@bot.message_handler(commands=['lutz', 'лутц'])
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ from urllib.request import urlopen
|
||||
html = BeautifulSoup(urlopen('https://telegra.ph/pythonchatru-07-07'), 'lxml')
|
||||
|
||||
|
||||
def get_rule(li):
|
||||
def fetch_rule(li):
|
||||
li = int(li)
|
||||
lis = html.find_all('li')
|
||||
if li <= len(lis):
|
||||
|
||||
Reference in New Issue
Block a user