From f96322a90d9af9363b0696aa06a7f5b5fb714ba1 Mon Sep 17 00:00:00 2001 From: Ryan Luu Date: Thu, 4 Jul 2024 12:17:46 +0000 Subject: [PATCH] Add title --- src/instagram_to_discord.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/instagram_to_discord.py b/src/instagram_to_discord.py index b6d753d..4ec2a60 100644 --- a/src/instagram_to_discord.py +++ b/src/instagram_to_discord.py @@ -21,13 +21,15 @@ L = instaloader.Instaloader() -def send_to_discord(post_url, image_url, author_name, author_icon_url, post_description, post_timestamp): +def send_to_discord(post_url, image_url, author_name, author_icon_url, post_description, post_timestamp, author_fullname): """Send a new Instagram post to Discord using a webhook.""" data = { "content": f"{post_url}", "embeds": [ { + "title": author_fullname, "description": post_description, + "url": post_url, "color": 13500529, "timestamp": post_timestamp.strftime("%Y-%m-%dT%H:%M:%S"), "author": { @@ -59,6 +61,7 @@ def check_for_new_posts(): author_icon_url = profile.profile_pic_url post_description = post.caption post_timestamp = post.date + author_fullname = profile.full_name send_to_discord( instagram_post_url, @@ -66,7 +69,8 @@ def check_for_new_posts(): author_name, author_icon_url, post_description, - post_timestamp + post_timestamp, + author_fullname ) break