Good afternoon. There is a script responsible for the countdown for each action, I want to add a POST/GET request at the end of each action, to get a messenger alert like
https://api.telegram.org/bot<YourBotToken>/sendMessage?chat_id=1234567&text=HelloBot
If I understand correctly, I need to do
func _Notify():
$HTTPRequest.request()
But I do not understand how I can tie it exactly to the end of the timer
And I'm not quite sure what I'm doing right. My programming skills, especially in this language, are literally zero.
The script in which to do I will attach below. Perhaps you can tell me the right script for this, or amend mine, for which I would be extremely grateful.
Also, I want to know if I can use the name of the action from the third line when sending a message?
This is an example of a workable script that I used in PHP, but I don't see how I can use it here, much less attach it to a function
$token = ;
$telegram_admin_id = ;
$msg = "$Action";
file_get_contents(https://api.telegram.org/bot'. $token .'/sendMessage?
chat_id='. $telegram_admin_id .'&text=' . urlencode($msg));
https://github.com/MilkMiracle/PROManager/blob/main/Scripts/AreaCard.gd