mirror of
https://gitlab.com/crafty-controller/crafty-4.git
synced 2024-08-30 18:23:09 +00:00
Alter webhook send
This commit is contained in:
parent
210fc306c4
commit
5ebe135fae
@ -27,7 +27,7 @@ class WebhookHandler:
|
||||
return ["server_start", "server_stop", "server_crash", "server_backup"]
|
||||
|
||||
@staticmethod
|
||||
def send_discord_webhook(title, message, color):
|
||||
def send_discord_webhook(title, url, message, color):
|
||||
dataset = {
|
||||
"username": "Crafty Webhooks",
|
||||
"avatar_url": "https://docs.craftycontrol.com/img/favicon.ico",
|
||||
@ -39,12 +39,8 @@ class WebhookHandler:
|
||||
}
|
||||
],
|
||||
}
|
||||
|
||||
logger.debug(
|
||||
"Webhook response: "
|
||||
+ requests.post(
|
||||
"",
|
||||
data=json.dumps(dataset),
|
||||
headers={"Content-type": "application/json"},
|
||||
),
|
||||
requests.post(
|
||||
url,
|
||||
data=json.dumps(dataset),
|
||||
headers={"Content-type": "application/json"},
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user