Skip to content

Commit

Permalink
add video URL to output
Browse files Browse the repository at this point in the history
  • Loading branch information
bghira committed Jan 12, 2025
1 parent 1b6ccfa commit 5b59daf
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions discord_tron_master/classes/command_processors/discord.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ async def send_message(command_processor, arguments: Dict, data: Dict, websocket
logger.debug(f"Incoming message to send, has an image url list.")
embeds = []
for image_url in arguments["image_url_list"]:
if image_url is None or str(image_url).lower == "none":
# video does this
continue
logger.debug(f"Adding {image_url} to embed")
embed = discord.Embed(url="http://tripleback.net")
embed.set_image(url=image_url)
embeds.append(embed)
if 'mp4' in image_url:
arguments["message"] = f"{arguments['message']}\nVideo URL: {image_url}"
else:
logger.debug(f"Adding {image_url} to embed")
embed = discord.Embed(url="http://tripleback.net")
embed.set_image(url=image_url)
embeds.append(embed)
wants_variations = len(arguments["image_url_list"])
else:
logger.debug(f"Incoming message to send, has zero image url list.")
Expand Down

0 comments on commit 5b59daf

Please sign in to comment.