Skip to content

Commit 203744d

Browse files
committed
Print project names with bold style
1 parent 21de986 commit 203744d

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

src/pycamp_bot/commands/projects.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -454,13 +454,13 @@ async def show_projects(update, context):
454454
projects = Project.select()
455455
text = []
456456
for project in projects:
457-
project_text = "{}\n Owner: @{}\n Temática: {}\n Nivel: {}\n Repositorio: {}\n Grupo de Telegram: {}".format(
458-
project.name,
459-
project.owner.username,
460-
project.topic,
457+
project_text = "*{}*\n Owner: @{}\n Temática: {}\n Nivel: {}\n Repositorio: {}\n Grupo de Telegram: {}".format(
458+
escape_markdown(project.name),
459+
escape_markdown(project.owner.username),
460+
escape_markdown(project.topic),
461461
DIFFICULTY_LEVEL_NAMES[project.difficult_level],
462-
project.repository_url or '(ninguno)',
463-
project.group_url or '(ninguno)',
462+
escape_markdown(project.repository_url or '(ninguno)'),
463+
escape_markdown(project.group_url or '(ninguno)'),
464464
)
465465
participants_count = Vote.select().where(
466466
(Vote.project == project) & (Vote.interest)).count()
@@ -473,7 +473,11 @@ async def show_projects(update, context):
473473
else:
474474
text = "Todavía no hay ningún proyecto cargado"
475475

476-
await update.message.reply_text(text, link_preview_options=LinkPreviewOptions(is_disabled=True))
476+
await update.message.reply_text(
477+
text,
478+
parse_mode='MarkdownV2',
479+
link_preview_options=LinkPreviewOptions(is_disabled=True),
480+
)
477481

478482

479483

0 commit comments

Comments
 (0)