Skip to content

Add automatic birthday announcement feature#331

Merged
Pierre-Demessence merged 4 commits into
masterfrom
copilot/fix-245
Jul 17, 2025
Merged

Add automatic birthday announcement feature#331
Pierre-Demessence merged 4 commits into
masterfrom
copilot/fix-245

Conversation

Copilot AI commented Jul 17, 2025

Copy link
Copy Markdown

Implements automatic birthday announcements using the same data source as the existing !bday command. The bot now periodically checks for birthdays and announces them in a configurable channel.

Features

  • Scheduled Birthday Checks: Configurable interval checking (default: every 4 hours)
  • Smart Announcements: Detects today's birthdays and creates friendly messages with age ordinals
  • Spam Prevention: Tracks announced birthdays per day to avoid duplicate announcements
  • Configurable Channel: Announcements sent to specified channel (recommended: #offtopic-chat)
  • Robust Error Handling: Gracefully handles network issues and data parsing errors

Configuration

New settings added to Settings.json:

{
  "BirthdayAnnouncementEnabled": true,
  "BirthdayCheckIntervalMinutes": 240,
  "BirthdayAnnouncementChannel": {
    "desc": "Channel for birthday announcements",
    "id": "YOUR_CHANNEL_ID"
  }
}

Example Output

🎉 **Happy Birthday John!** 🎂 Hope you have a wonderful 25th birthday!
🎉 **Happy Birthday Alice!** 🎂 Hope you have a wonderful day!

Implementation Details

  • BirthdayAnnouncementService: New background service following the same pattern as ReminderService
  • Data Source: Uses identical Google Sheets parsing as existing !bday command
  • Service Registration: Integrated into dependency injection system
  • Logging: Comprehensive logging for monitoring and debugging
  • Daily Reset: Announcement tracking resets at midnight for next day's birthdays

The service automatically starts when the bot starts and runs continuously in the background.

Fixes #245.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • docs.google.com
    • Triggering command: /tmp/testproject2/bin/Debug/net8.0/testproject2 (dns block)
  • www.myget.org
    • Triggering command: dotnet build (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@deepsource-io

deepsource-io Bot commented Jul 17, 2025

Copy link
Copy Markdown

Here's the code health analysis summary for commits 5337fcb..fc0be3a. View details on DeepSource ↗.

Analysis Summary

AnalyzerStatusSummaryLink
DeepSource C# LogoC#✅ Success
❗ 5 occurences introduced
View Check ↗

💡 If you’re a repository administrator, you can configure the quality gates from the settings.

Co-authored-by: Pierre-Demessence <1756398+Pierre-Demessence@users.noreply.github.com>
Copilot AI changed the title [WIP] Bot announces birthday Add automatic birthday announcement feature Jul 17, 2025
Copilot AI requested a review from Pierre-Demessence July 17, 2025 06:15
@Pierre-Demessence

Copy link
Copy Markdown
Member

/deploy_dev

@github-actions

Copy link
Copy Markdown

🚀 Starting deployment of Unity-Developer-Community/UDC-Bot:copilot/fix-245 to development...

Comment thread DiscordBot/Services/BirthdayAnnouncementService.cs Outdated
Co-authored-by: Pierre-Demessence <1756398+Pierre-Demessence@users.noreply.github.com>

Copilot AI commented Jul 17, 2025

Copy link
Copy Markdown
Author

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • www.myget.org
    • Triggering command: dotnet build (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@Pierre-Demessence

Copy link
Copy Markdown
Member

/deploy_dev

@github-actions

Copy link
Copy Markdown

🚀 Starting deployment of Unity-Developer-Community/UDC-Bot:copilot/fix-245 to development...

@Pierre-Demessence

Copy link
Copy Markdown
Member

/deploy_dev

@github-actions

Copy link
Copy Markdown

🚀 Starting deployment of Unity-Developer-Community/UDC-Bot:copilot/fix-245 to development...

@Pierre-Demessence Pierre-Demessence marked this pull request as ready for review July 17, 2025 19:50
@Pierre-Demessence Pierre-Demessence merged commit 9792aa0 into master Jul 17, 2025
8 checks passed
@Pierre-Demessence Pierre-Demessence deleted the copilot/fix-245 branch July 17, 2025 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bot announces birthday

2 participants