a moon tracking bot for Bluesky
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

refactor(moonPhaseMessages): improve message construction logic

Ensure proper spacing in base message and restructure month flair handling
Add British references only when month flair exists

+13 -5
+13 -5
src/core/moonPhaseMessages.ts
··· 47 47 break; 48 48 } 49 49 50 - // Add month-specific flair with British references 51 - let monthFlair = ""; 50 + // Ensure baseMessage ends with a space for proper concatenation 51 + baseMessage += ' '; 52 + 53 + // Add month-specific flair 54 + let monthFlairText = ""; 52 55 if (monthFlairs[currentMonth]) { 53 - monthFlair = getRandomElement(monthFlairs[currentMonth]); 56 + monthFlairText = getRandomElement(monthFlairs[currentMonth]); 57 + } 58 + 59 + // Add a British reference to the month flair 60 + if (monthFlairText) { // Only add if there's a base month flair 61 + monthFlairText += ` ${getRandomElement(britishReferences)}`; 54 62 } 55 63 56 64 // Add a Pride reference for June 57 65 if (currentMonth === "June" && Math.random() < 0.7) { // 70% chance to add a Pride reference in June 58 - monthFlair += ` ${getRandomElement(prideReferences)}`; 66 + monthFlairText += ` ${getRandomElement(prideReferences)}`; 59 67 } 60 68 61 - let finalMessage = `${baseMessage}${monthFlair}`; 69 + let finalMessage = `${baseMessage}${monthFlairText}`; 62 70 63 71 // Ensure message is within 300 characters 64 72 if (finalMessage.length > 300) {