Last active
April 9, 2022 22:15
-
-
Save TheGarkine/22f93c0c3255ff07b71a4196393382da to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const email = document.getElementById("contactEmail").value; | |
| const message = document.getElementById("contactMessage").value; | |
| const text = encodeURIComponent(`Email: ${email}\n\n---Message below---\n${message}`); | |
| const url = `https://api.telegram.org/bot${botApiKey}/sendMessage?chat_id=${chatID}&text=${text}`; | |
| const request = new XMLHttpRequest(); | |
| request.open( "GET", url, false ); // false for synchronous request | |
| request.send(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment