Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions src/pycamp_bot/commands/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@
CHECK_GRUPO = "check_grupo"
GRUPO = "grupo"

DIFFICULTY_LEVEL_NAMES = {
1: 'inicial',
2: 'intermedio',
3: 'avanzado',
}

REPO_EXISTS_PATTERN = 'repoexists'
PROJECT_NAME_PATTERN = 'projectname'
GROUP_EXISTS_PATTERN = 'groupexists'
Expand Down Expand Up @@ -78,9 +84,9 @@ async def naming_project(update, context):
text=textwrap.dedent("""
¿Cuál es el nivel de dificultad del proyecto?

1: newbie friendly
2: intermedio
3: python avanzado"""
1: {DIFFICULTY_LEVEL_NAMES[1]}
2: {DIFFICULTY_LEVEL_NAMES[2]}
3: {DIFFICULTY_LEVEL_NAMES[3]}"""
)
)
return DIFICULTAD
Expand Down Expand Up @@ -446,7 +452,7 @@ async def show_projects(update, context):
project.name,
project.owner.username,
project.topic,
project.difficult_level,
DIFFICULTY_LEVEL_NAMES[project.difficult_level]
project.repository_url or '(ninguno)',
project.group_url or '(ninguno)',
)
Expand Down
Loading