Skip to content

Instantly share code, notes, and snippets.

@christophervigliotti
Created March 5, 2026 02:10
Show Gist options
  • Select an option

  • Save christophervigliotti/22b5fa5695a05daf4523e9b691a0e640 to your computer and use it in GitHub Desktop.

Select an option

Save christophervigliotti/22b5fa5695a05daf4523e9b691a0e640 to your computer and use it in GitHub Desktop.
Posts today and tomorrow details for Pokemon Go events
import requests
from datetime import datetime, timezone, timedelta
# --- CONFIGURATION ---
# Replace this with your actual Discord Webhook URL
DISCORD_WEBHOOK_URL="your webhook url goes here"
def get_pogo_data(target_date):
"""Returns PoGo event data for a specific date."""
base_data = {
"wild": [
"Almost all Kanto Pokémon in their natural Biomes!",
"Ditto Disguises: Spearow, Ekans, Sandshrew, Gloom, Kakuna, Nidorino"
],
"raids": {
"5-Star": "Articuno (1/20), Zapdos (1/20), Moltres (1/20)",
"Mega": "Mega Pinsir (1/64)",
"Shadow": "Shadow Latias (1/20)"
},
"eggs": {
"2km": "Pichu, Togepi, Toxel, Riolu, Mime Jr."
}
}
if target_date.weekday() == 2: # Wednesday
base_data["note"] = "RAID HOUR (6-7 PM): Articuno, Zapdos, and Moltres!"
elif target_date.weekday() == 3: # Thursday
base_data["note"] = "GO Pass Update: New tasks & 2x Catch XP active!"
return base_data
def create_embed(label, target_date):
"""Formats the data into a Discord-friendly embed dictionary."""
data = get_pogo_data(target_date)
date_str = target_date.strftime("%A, %B %d, %Y")
# Set color: Today = Green (3066993), Tomorrow = Blue (3447003)
color = 3066993 if label == "Today" else 3447003
embed = {
"title": f"📅 {label.upper()}: {date_str}",
"color": color,
"fields": [
{"name": "🐾 Wild Spawns", "value": "\n".join([f"• {p}" for p in data['wild']]), "inline": False},
{"name": "⚔️ Raids", "value": f"5-Star: {data['raids']['5-Star']}\nMega: {data['raids']['Mega']}\nShadow: {data['raids']['Shadow']}", "inline": False},
{"name": "🥚 Egg Hatches (2km)", "value": data['eggs']['2km'], "inline": False}
],
"footer": {"text": "Pokémon GO 30th Anniversary | ScrapedDuck API"}
}
if "note" in data:
embed["description"] = f"⚠️ **ALERT:** {data['note']}"
print (embed)
return embed
def send_to_discord():
today = datetime.now()
tomorrow = today + timedelta(days=1)
payload = {
"username": "Prof. Brubinga",
"avatar_url": "https://i.imgur.com/WvC6K9N.png", # Professor Willow Icon
"embeds": [
create_embed("Today", today),
create_embed("Tomorrow", tomorrow)
]
}
try:
response = requests.post(DISCORD_WEBHOOK_URL, json=payload)
print(response)
response.raise_for_status()
print("Successfully sent Today & Tomorrow updates to Discord!")
except Exception as e:
print(f"Error sending to Discord: {e}")
if __name__ == "__main__":
send_to_discord()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment