1515
1616_logger = logging .getLogger (__name__ )
1717
18+ REGISTRATION_BUTTON_LABEL = "Register here :point_left:"
19+ WELCOME_MESSAGE_TITLE = "## Welcome to EuroPython 2025 on Discord! :tada::snake:"
1820
19- class RegistrationForm (discord .ui .Modal , title = "EuroPython 2024 Registration" ):
21+
22+ class RegistrationForm (discord .ui .Modal , title = "EuroPython 2025 Registration" ):
2023 def __init__ (
2124 self ,
2225 config : RegistrationConfig ,
@@ -128,7 +131,7 @@ async def log_registration_to_channel(
128131 interaction .client .get_all_channels (), name = self .config .registration_log_channel_name
129132 )
130133 message_lines = [
131- f"✅ : **{ interaction .user .mention } REGISTERED**" ,
134+ f":white_check_mark : **{ interaction .user .mention } REGISTERED**" ,
132135 f"{ name = } { order = } roles={ [role .name for role in roles ]} " ,
133136 ]
134137 await channel .send (content = "\n " .join (message_lines ))
@@ -147,7 +150,7 @@ async def log_error_to_channel(self, interaction: Interaction, message: str) ->
147150 channel = discord_get (
148151 interaction .client .get_all_channels (), name = self .config .registration_log_channel_name
149152 )
150- await channel .send (content = f"❌ : **{ interaction .user .mention } ERROR**\n { message } " )
153+ await channel .send (content = f":x : **{ interaction .user .mention } ERROR**\n { message } " )
151154
152155
153156class RegistrationCog (commands .Cog ):
@@ -167,7 +170,7 @@ def __init__(self, bot: Client, config: RegistrationConfig) -> None:
167170 async def on_ready (self ) -> None :
168171 await self .pretix_connector .fetch_pretix_data ()
169172
170- button = discord .ui .Button (style = discord .ButtonStyle .green , label = "Register here 👈" )
173+ button = discord .ui .Button (style = discord .ButtonStyle .green , label = REGISTRATION_BUTTON_LABEL )
171174 button .callback = lambda interaction : interaction .response .send_modal (
172175 RegistrationForm (
173176 config = self .config ,
@@ -181,36 +184,35 @@ async def on_ready(self) -> None:
181184 reg_help_channel = discord_get (
182185 self .bot .get_all_channels (), name = self .config .registration_help_channel_name
183186 )
184- welcome_message = create_welcome_message (
185- textwrap . dedent (
186- f"""
187- Follow these steps to complete your registration:
187+ welcome_message = textwrap . dedent (
188+ f"""
189+ { WELCOME_MESSAGE_TITLE } \n
190+ Follow these steps to complete your registration:
188191
189- 1️⃣ Click on the green "Register here 👈 " button below.
192+ :one: Click on the green "%s " button below.
190193
191- 2️⃣ Fill in your Order ID and the name on your ticket. You can find them
192- * Printed on your ticket
193- * Printed on your badge
194- * In the email "[EuroPython 2024 ] Your order: XXXXX" from support@pretix.eu
194+ :two: Fill in your Order ID and the name on your ticket. You can find them
195+ * Printed on your ticket
196+ * Printed on your badge
197+ * In the email "[EuroPython 2025 ] Your order: XXXXX" from support@pretix.eu
195198
196- 3️⃣ Click "Submit".
199+ :three: Click "Submit".
197200
198- These steps will assign the correct server permissions and set your server nickname.
201+ These steps will assign the correct server permissions and set your server nickname.
199202
200- Experiencing trouble? Please contact us
201- * In the { reg_help_channel .mention } channel
202- * By speaking to a volunteer in a yellow t-shirt
203+ Experiencing trouble? Please contact us
204+ * In the { reg_help_channel .mention } channel
205+ * By speaking to a volunteer in a yellow t-shirt
203206
204- Enjoy our EuroPython 2024 Community Server! 🐍💻🎉
205- """
206- )
207+ Enjoy our EuroPython 2025 Community Server! :snake::computer::tada:
208+ """ % REGISTRATION_BUTTON_LABEL
207209 )
208210
209211 channel = discord_get (
210212 self .bot .get_all_channels (), name = self .config .registration_form_channel_name
211213 )
212214 await channel .purge ()
213- await channel .send (embed = welcome_message , view = view )
215+ await channel .send (welcome_message , view = view )
214216
215217 async def cog_load (self ) -> None :
216218 """Load the initial schedule."""
@@ -228,10 +230,9 @@ async def cog_unload(self) -> None:
228230 )
229231 await reg_channel .purge ()
230232 await reg_channel .send (
231- embed = create_welcome_message (
232- "The registration bot is currently offline. "
233- "We apologize for the inconvenience and are working hard to fix the issue."
234- )
233+ f"{ WELCOME_MESSAGE_TITLE } \n "
234+ "The registration bot is currently offline. "
235+ "We apologize for the inconvenience and are working hard to fix the issue."
235236 )
236237
237238 @tasks .loop (minutes = 5 )
@@ -242,12 +243,3 @@ async def fetch_pretix_updates(self) -> None:
242243 _logger .info ("Finished the periodic pretix update." )
243244 except Exception :
244245 _logger .exception ("Periodic pretix update failed" )
245-
246-
247- def create_welcome_message (body : str ) -> discord .Embed :
248- orange = 0xFF8331
249- return discord .Embed (
250- title = "Welcome to EuroPython 2024 on Discord! 🎉🐍" ,
251- description = body ,
252- color = orange ,
253- )
0 commit comments