Skip to content

Commit

Permalink
add support reminder webhook (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
PBillingsby authored Nov 19, 2024
1 parent e836db7 commit f4428ab
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/support_reminder.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Support Reminder

on:
schedule:
# Runs every 4 days at 16:30 (4:30 PM UTC), starting 2 days after Ambassador Reminder
- cron: "30 16 3-31/4 * *"

jobs:
run-support-reminder:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Build and run the support reminder bot
env:
SUPPORT_REMINDER_DISCORD_WEBHOOK: ${{ secrets.SUPPORT_REMINDER_DISCORD_WEBHOOK }}
run: |
docker compose run --env SUPPORT_REMINDER_DISCORD_WEBHOOK=$SUPPORT_REMINDER_DISCORD_WEBHOOK --entrypoint "sh -c 'python3 support_reminder.py'" lilypad_assistant
55 changes: 55 additions & 0 deletions support_reminder.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
from utils.discord import send_discord_message
from datetime import datetime, timezone
from vars import SUPPORT_REMINDER_DISCORD_WEBHOOK


def send_support_reminder():
"""
Sends a reminder for the Lilypad support channels on GitHub.
"""
announcement = """
🌟 Lilypad GitHub Support Reminder 🌟
Hey Lilypad community! 👋
Just a quick reminder about how to effectively troubleshoot and push inquiries forward:
🔗 **Use GitHub Discussions**:
For any technical issues, troubleshooting, or general questions,
our GitHub Discussions channels are the go-to place to connect with the team and other community members.
Any support issues brought up in the General Discord channel will be deleted.
📋 **Where to Post:**
- **Complex Issues**: Start a new discussion using the [`rp-issue`](https://github.com/orgs/Lilypad-Tech/discussions/categories/rp-issue) template if you're a resource provider or need technical assistance.
- **General Questions**: Share your thoughts in a general discussion or the [#i-need-help channel](https://discord.com/channels/1212897693450641498/1230231823674642513) on Discord.
🛠️ **Why GitHub Discussions?**
- It keeps conversations organized and accessible for everyone.
- It helps the team track, prioritize, and resolve issues effectively.
- Your feedback contributes directly to improving Lilypad!
🚀 **Pro Tip**: Always provide as much detail as possible (e.g., steps to reproduce, error messages, setup configurations). The more context, the quicker we can help!
Thank you for keeping Lilypad running smoothly by sharing your insights and helping us troubleshoot together. Let’s continue building a stronger community! 💪✨
"""

current_time = datetime.now(timezone.utc).strftime('%Y-%m-%d %H:%M:%S')
print(f"Sending announcement at {current_time} UTC")

try:
send_discord_message(SUPPORT_REMINDER_DISCORD_WEBHOOK, announcement)
print("Announcement sent successfully!")
except Exception as e:
print(f"Failed to send announcement: {e}")


def main():
send_support_reminder()


if __name__ == "__main__":
main()
2 changes: 2 additions & 0 deletions vars.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
OSS_DISCORD_WEBHOOK = os.getenv('OSS_DISCORD_WEBHOOK')
POW_MONITORING_WEBHOOK = os.getenv('POW_DISCORD_WEBHOOK')
AMBASSADOR_REMINDER_WEBHOOK = os.getenv('AMBASSADOR_REMINDER_DISCORD_WEBHOOK')
SUPPORT_REMINDER_DISCORD_WEBHOOK = os.getenv(
'SUPPORT_REMINDER_DISCORD_WEBHOOK')

# Discord bot tokens
LOGS_BOT_TOKEN = os.getenv('LOGS_BOT_TOKEN')
Expand Down

0 comments on commit f4428ab

Please sign in to comment.