yoloing a discord webhook
parent
998fdb730c
commit
7d7caf803d
@ -0,0 +1,22 @@
|
||||
import requests
|
||||
from suchwow import config
|
||||
|
||||
|
||||
intro = ["Whatup", "What is up", "What the fuck is up", "what in the fuck is up", "Yo"]
|
||||
insults = ["fart sacks", "dick lips", "shit stains", "chodes", "cum guzzlers", "dipshits", "dicknipples", "turd burglars"]
|
||||
|
||||
|
||||
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} from {post.submitter}! Send funds to [{post_wow_address}](https://wownero.club/address/{post_wow_address}) to show support!"
|
||||
msg = {"content": content}
|
||||
discord_webhook_url = config.DISCORD_URL
|
||||
r = requests.post(discord_webhook_url, data=msg)
|
||||
r.raise_for_status()
|
||||
if r.status.ok:
|
||||
print(f"Posted #{post.id} to Discord")
|
||||
return True
|
||||
else:
|
||||
print(f"Unable to post #{post.id} to Discord")
|
||||
return False
|
Loading…
Reference in New Issue