Go to your Discord server settings, then Integrations -> Webhooks, then click New Webhook.
Integrations
Webhooks
New Webhook
Give your Webhook Integration a name and select what channel it will post in
Fork this function, paste in your webhook URL, and run it!