Skip to content

Commit b6829f6

Browse files
committed
Adding inline button when displaying rules
1 parent 91debe3 commit b6829f6

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

tg_bot/modules/rules.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,17 @@ def send_rules(update, chat_id, from_pm=False):
3636
text = "Ecco il regolamento di *{}*:\n\n{}".format(escape_markdown(chat.title), rules)
3737

3838
if from_pm and rules:
39-
bot.send_message(user.id, text, parse_mode=ParseMode.MARKDOWN, preview=False)
39+
bot.send_message(user.id, text,
40+
parse_mode=ParseMode.MARKDOWN,
41+
preview=False,
42+
disable_web_page_preview=True,
43+
reply_markup=InlineKeyboardMarkup(
44+
[[InlineKeyboardButton(text="Leggi il CoC",
45+
url="https://telegra.ph/CoC-di-PythonItalia-07-09"
46+
)
47+
]]
48+
)
49+
)
4050
elif from_pm:
4151
bot.send_message(user.id, "Gli admin non hanno ancora impostato le regole del gruppo. "
4252
"Questo non significa che siamo nel far-west!")

0 commit comments

Comments
 (0)