From 7599a3aa8a926b0d9be570edf551ec4eb569002f Mon Sep 17 00:00:00 2001 From: lza_menace Date: Thu, 29 Oct 2020 10:15:16 -0700 Subject: [PATCH] update webhook content to link direct image --- suchwow/discord.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/suchwow/discord.py b/suchwow/discord.py index fa9eaa2..c7b0548 100644 --- a/suchwow/discord.py +++ b/suchwow/discord.py @@ -1,4 +1,5 @@ import requests +from flask import url_for from random import choice from suchwow import config from suchwow import wownero @@ -11,7 +12,7 @@ insults = ["fart sacks", "dick lips", "shit stains", "chodes", "dipshits", "dick def post_discord_webhook(post): wallet = wownero.Wallet() post_wow_address = wallet.get_address(account=post.account_index) - content = f"{choice(intro)} {choice(insults)}, check out the new SuchWow post [#{post.id}](https://suchwow.xyz/post/{post.id}) from [{post.submitter}](https://suchwow.xyz/?submitter={post.submitter})! Send funds to [{post_wow_address}](https://wownero.club/address/{post_wow_address}) to show support!" + content = f"{choice(intro)} {choice(insults)}, new SuchWow post is up! #{post.id} by {post.submitter}. Tip WOW to `{post_wow_address}` to show support! {url_for('post.uploaded_file', filename=post.image_name)}" msg = {"content": content} discord_webhook_url = config.DISCORD_URL r = requests.post(discord_webhook_url, data=msg)