-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need Help #2
Comments
hi there! as far as I see, your script missing }} in the end (if statement not closed and doPost function not closed) |
var target = contents.mAssage.reply_to_message.from.id; |
yea, ive fixed that and catched the error after that |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello sir.
im facing an issue , hope you can help
every time i Create a variable that contains a special character like ( _ or @ )my script stops working
for example:
var target = contents.massage.reply_to_message.from.id;
if add this line to my script the script stops working
my full script is here
'
function setWebhook() {
var url = telegramUrl + "/setWebhook?url=" + webAppUrl;
var response = UrlFetchApp.fetch(url);
}
function sendMessage(id, text,) {
var url = telegramUrl + "/sendMessage?chat_id=" + id + "&text=" + text;
sponse = UrlFetchApp.fetch(url);
}
function doPost(e) {
var contents = JSON.parse(e.postData.contents);
var id = contents.message.from.id;
var text = contents.message.text;
var target = contents.massage.reply_to_message.from.id;
if (text.includes("/who")) {
sendMessage(id, "it is " + target+ " :) " );
The text was updated successfully, but these errors were encountered: