Skip to content

Commit cc760f6

Browse files
authored
Support Beginners' Day (#260)
* Fix minor role config details * Add Beginners' Day configuration * Suggest common debugging step during registration
1 parent e6ae8cd commit cc760f6

File tree

4 files changed

+31
-3
lines changed

4 files changed

+31
-3
lines changed

prod-config.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ pretix_cache_file = "pretix_cache.json"
2727
"Presenter" = ["Participants", "Onsite Participants", "Speakers"]
2828
# onsite volunteers
2929
"On-site Volunteer" = ["Participants", "Onsite Participants", "Volunteers", "Onsite Volunteers"]
30+
# beginners' day
31+
"Beginners’ Day Unconference / Humble Data Access" = ["Beginners Day"]
3032

3133
[registration.variation_to_roles]
3234
# organizers

scripts/configure-guild.py

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
YELLOW = "#FFD700"
8383
PURPLE = "#D34EA5"
8484
GREY = "#99AAB5"
85+
DARK_PURPLE = "#658B34"
8586

8687
Permission = Literal[
8788
"view_channel",
@@ -225,6 +226,7 @@ def verify_permission_roles(self) -> Self:
225226
ROLE_SPONSORS = "Sponsors"
226227
ROLE_PARTICIPANTS = "Participants"
227228
ROLE_EVERYONE = "@everyone"
229+
ROLE_BEGINNERS_DAY = "Beginners Day"
228230

229231
ROLES_COC = [ROLE_COC]
230232
ROLES_MODERATORS = [ROLE_MODERATORS, *ROLES_COC]
@@ -290,15 +292,21 @@ def verify_permission_roles(self) -> Self:
290292
mentionable=True,
291293
),
292294
Role(
293-
name="Participants",
295+
name=ROLE_PARTICIPANTS,
294296
color=PURPLE,
295297
hoist=True,
296298
mentionable=True,
297299
permissions=["use_external_emojis", "use_external_stickers", "create_polls"],
298300
),
299301
Role(name="Onsite Participants"),
300302
Role(name="Remote Participants"),
301-
Role(name="Programme Team"),
303+
Role(
304+
name=ROLE_BEGINNERS_DAY,
305+
color=DARK_PURPLE,
306+
mentionable=True,
307+
permissions=["use_external_emojis", "use_external_stickers", "create_polls"],
308+
),
309+
Role(name="Programme Team", mentionable=True),
302310
Role(
303311
name="@everyone",
304312
permissions=[
@@ -580,6 +588,19 @@ def verify_permission_roles(self) -> Self:
580588
"(e.g., for groups working on a sub-project), that should be fine, too."
581589
),
582590
),
591+
ForumChannel(
592+
name="beginners-day",
593+
topic=(
594+
"Channel for the Beginners' Day: "
595+
"https://ep2025.europython.eu/beginners-day/"
596+
),
597+
permission_overwrites=[
598+
PermissionOverwrite(
599+
roles=[ROLE_BEGINNERS_DAY],
600+
allow=["view_channel"],
601+
),
602+
],
603+
),
583604
ForumChannel(
584605
name="slides-and-artefacts",
585606
topic="""

src/europython_discord/registration/cog.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,10 @@ async def on_submit(self, interaction: discord.Interaction) -> None:
8383
role_names.update(self.config.variation_to_roles[ticket.variation])
8484

8585
if not role_names:
86-
await self.log_error_to_user(interaction, "No ticket found.")
86+
await self.log_error_to_user(
87+
interaction,
88+
"No such conference ticket found. Did you use another ticket (e.g. Social Event)?",
89+
)
8790
await self.log_error_to_channel(interaction, f"Tickets without roles: {tickets}")
8891
_logger.info(f"Tickets without role assignments: {tickets}")
8992
return

test-config.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ pretix_cache_file = "pretix_cache.json"
2727
"Presenter" = ["Participants", "Onsite Participants", "Speakers"]
2828
# onsite volunteers
2929
"On-site Volunteer" = ["Participants", "Onsite Participants", "Volunteers", "Onsite Volunteers"]
30+
# beginners' day
31+
"Beginners’ Day Unconference / Humble Data Access" = ["Beginners Day"]
3032

3133
[registration.variation_to_roles]
3234
# organizers

0 commit comments

Comments
 (0)