took out discord webhook to env variable

This commit is contained in:
norohind 2021-12-18 00:18:38 +03:00
parent 79dbb49c17
commit 5d75162e22
Signed by: norohind
GPG Key ID: 01C3BECC26FB59E1

View File

@ -149,8 +149,7 @@ def notify_discord(message: str) -> None:
logger.warning(f'Refuse to send len={len(message)}, content dump:\n{message}')
message = 'Len > 2000, check logs'
# hookURL: str = 'https://discord.com/api/webhooks/896514472280211477/LIKgbgNIr9Nvuc-1-FfylAIY1YV-a7RMjBlyBsVDellMbnokXLYKyBztY1P9Q0mabI6o' # noqa: E501 # FBSC
hookURL: str = 'https://discord.com/api/webhooks/902216904507260958/EIUwZ05r0_U2oa_xz8aVVEJyTC6DVk4ENxGYSde8ZNU7aMWBsc3Bo_gBis1_yUxJc3CC' # noqa: E501 # dev FBSC
hookURL: str = os.environ['DISCORD_NOTIFICATIONS_HOOK']
content: bytes = f'content={requests.utils.quote(message)}'.encode('utf-8')
discord_request: requests.Response = requests.post(