mirror of
https://git.wownero.com/lza_menace/suchwow.git
synced 2024-08-15 01:03:19 +00:00
add reddit posting again
This commit is contained in:
parent
31e1af9426
commit
67d8121288
1 changed files with 8 additions and 1 deletions
|
@ -116,9 +116,16 @@ def approve(id):
|
||||||
post_webhook(f"Post [{post.id}]({url}) approved :white_check_mark: by `{get_session_user()}` :fieri_parrot:")
|
post_webhook(f"Post [{post.id}]({url}) approved :white_check_mark: by `{get_session_user()}` :fieri_parrot:")
|
||||||
flash("Approved")
|
flash("Approved")
|
||||||
if current_app.config["DEBUG"] is False:
|
if current_app.config["DEBUG"] is False:
|
||||||
|
_r = None
|
||||||
|
_d = None
|
||||||
|
if not post.to_reddit:
|
||||||
|
_r = make_post(post)
|
||||||
if not post.to_discord:
|
if not post.to_discord:
|
||||||
_d = post_discord_webhook(post)
|
_d = post_discord_webhook(post)
|
||||||
post_webhook(f"Post [{post.id}]({url}) submitted :dab_parrot: to Discord.")
|
if _r and _d:
|
||||||
|
post_webhook(f"Post [{post.id}]({url}) submitted :dab_parrot: to Reddit and Discord.")
|
||||||
|
else:
|
||||||
|
post_webhook(f"Post [{post.id}]({url}) failed :this-is-fine-fire: to post to socials...Reddit: {_r} - Discord: {_d}")
|
||||||
return redirect(url_for("mod_queue"))
|
return redirect(url_for("mod_queue"))
|
||||||
else:
|
else:
|
||||||
flash("You can't approve this")
|
flash("You can't approve this")
|
||||||
|
|
Loading…
Reference in a new issue