diff --git a/stdin2discord.py b/stdin2discord.py index 007eb5f..a55f99f 100644 --- a/stdin2discord.py +++ b/stdin2discord.py @@ -1,12 +1,13 @@ import sys import requests +import os def send(_msg: str): if len(_msg) == 0: return r = requests.post( - url='https://discord.com/api/webhooks/936927833572380692/QrqoK8aVCOkGFh1L0HaHPd_Z-Usj-ubhXYvHadZyCA1Y5GOB7-0xWmuyKI9l4byvKjQ1', + url=os.environ['DISCORD_WEBHOOK'], data=f'content=```diff\n{requests.utils.quote(_msg)}```'.encode('utf-8'), headers = {'Content-Type': 'application/x-www-form-urlencoded'} )