Archived
1
0
Fork 0

Add some emojis

This commit is contained in:
Ethanell 2020-11-07 15:34:03 +01:00
parent 1618345ba3
commit 346a622ab5
4 changed files with 18 additions and 18 deletions

View file

@ -103,5 +103,5 @@ def create(update: Update, context: CallbackContext):
output.write(output_stream) output.write(output_stream)
output_stream.seek(0) output_stream.seek(0)
context.bot.send_document(chat_id=update.effective_chat.id, document=output_stream, context.bot.send_document(chat_id=update.effective_chat.id, document=output_stream,
reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton("Home", callback_data="home")], reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton("🏘 Home", callback_data="home")],
[InlineKeyboardButton("New", callback_data="new")]])) [InlineKeyboardButton("📝 New", callback_data="new")]]))

View file

@ -30,5 +30,5 @@ def data(update: Update, context: CallbackContext):
callback_data="edit_birth_city")], callback_data="edit_birth_city")],
[InlineKeyboardButton("Address", [InlineKeyboardButton("Address",
callback_data="edit_address")], callback_data="edit_address")],
[InlineKeyboardButton("Home", [InlineKeyboardButton("🏘 Home",
callback_data="home")]])) callback_data="home")]]))

View file

@ -10,9 +10,9 @@ def new(update: Update, context: CallbackContext):
u = s.query(db.User).get(update["_effective_user"]["id"]) u = s.query(db.User).get(update["_effective_user"]["id"])
if not u or not all([u.first_name, u.last_name, u.birth_date, u.birth_city, u.address]): if not u or not all([u.first_name, u.last_name, u.birth_date, u.birth_city, u.address]):
context.bot.send_message(chat_id=update.effective_chat.id, text="You have no data saved !", context.bot.send_message(chat_id=update.effective_chat.id, text="You have no data saved !",
reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton("Set data", reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton("⚙️ Set data",
callback_data="data")], callback_data="data")],
[InlineKeyboardButton("Home", callback_data="home")] [InlineKeyboardButton("🏘 Home", callback_data="home")]
])) ]))
else: else:
if update.effective_chat.id not in reasons: if update.effective_chat.id not in reasons:
@ -20,9 +20,9 @@ def new(update: Update, context: CallbackContext):
if update["_effective_user"]["id"] not in reasons[update.effective_chat.id]: if update["_effective_user"]["id"] not in reasons[update.effective_chat.id]:
reasons[update.effective_chat.id][update["_effective_user"]["id"]] = [] reasons[update.effective_chat.id][update["_effective_user"]["id"]] = []
last_line = [InlineKeyboardButton("Home", callback_data="home")] last_line = [InlineKeyboardButton("🏘 Home", callback_data="home")]
if len(reasons[update.effective_chat.id][update["_effective_user"]["id"]]) != 0: if len(reasons[update.effective_chat.id][update["_effective_user"]["id"]]) != 0:
last_line.append(InlineKeyboardButton("Send", callback_data="create")) last_line.append(InlineKeyboardButton("Send", callback_data="create"))
context.bot.send_message(chat_id=update.effective_chat.id, context.bot.send_message(chat_id=update.effective_chat.id,
text=f"Select your reasons\n`" + text=f"Select your reasons\n`" +
@ -30,14 +30,14 @@ def new(update: Update, context: CallbackContext):
"`", "`",
parse_mode=ParseMode.MARKDOWN_V2, parse_mode=ParseMode.MARKDOWN_V2,
reply_markup=InlineKeyboardMarkup([ reply_markup=InlineKeyboardMarkup([
[InlineKeyboardButton("Work", callback_data="reason_work"), [InlineKeyboardButton("💼 Work", callback_data="reason_work"),
InlineKeyboardButton("Shopping", callback_data="reason_shopping")], InlineKeyboardButton("🛒 Shopping", callback_data="reason_shopping")],
[InlineKeyboardButton("Health", callback_data="reason_health"), [InlineKeyboardButton("💊 Health", callback_data="reason_health"),
InlineKeyboardButton("Family", callback_data="reason_family")], InlineKeyboardButton("👨‍👩‍👧‍👦 Family", callback_data="reason_family")],
[InlineKeyboardButton("Handicap", callback_data="reason_handicap"), [InlineKeyboardButton("♿️ Handicap", callback_data="reason_handicap"),
InlineKeyboardButton("Sport/animal", callback_data="reason_sport_animal")], InlineKeyboardButton("🚴‍♀️🐕 Sport/animal", callback_data="reason_sport_animal")],
[InlineKeyboardButton("Injunction", callback_data="reason_injunction"), [InlineKeyboardButton("⚖️ Injunction", callback_data="reason_injunction"),
InlineKeyboardButton("Missions", callback_data="reason_missions")], InlineKeyboardButton("📜 Missions", callback_data="reason_missions")],
[InlineKeyboardButton("Children", callback_data="reason_children")], [InlineKeyboardButton("👶 Children", callback_data="reason_children")],
last_line])) last_line]))

View file

@ -5,9 +5,9 @@ from telegram.ext import CallbackContext, CommandHandler
def start(update: Update, context: CallbackContext): def start(update: Update, context: CallbackContext):
context.bot.send_message(chat_id=update.effective_chat.id, context.bot.send_message(chat_id=update.effective_chat.id,
text="Welcome to TeleExit", text="Welcome to TeleExit",
reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton("Create a new certificate", reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton("📝 Create a new certificate",
callback_data="new")], callback_data="new")],
[InlineKeyboardButton("Manage saved data", [InlineKeyboardButton("⚙️ Manage saved data",
callback_data="data")] callback_data="data")]
])) ]))