Size: a a a

2017 February 10

NK

ID:328943378 in Dev Chat
in my bot application their is a place where i need to ask the use to input or select a date from a calender. how can i achieve it
источник

。◕‿◕。 in Dev Chat
there is no default pattern, you can try to create you own "date picker" with inline buttons
источник

1

1C-Bitrix in Dev Chat
ID:328943378
in my bot application their is a place where i need to ask the use to input or select a date from a calender. how can i achieve it
just create form with one validator which checks the message by this regex:
^(?:(?:31(\/|-|\.)(?:0?[13578]|1[02]))\1|(?:(?:29|30)(\/|-|\.)(?:0?[1,3-9]|1[0-2])\2))(?:(?:1[6-9]|[2-9]\d)?\d{2})$|^(?:29(\/|-|\.)0?2\3(?:(?:(?:1[6-9]|[2-9]\d)?(?:0[48]|[2468][048]|[13579][26])|(?:(?:16|[2468][048]|[3579][26])00))))$|^(?:0?[1-9]|1\d|2[0-8])(\/|-|\.)(?:(?:0?[1-9])|(?:1[0-2]))\4(?:(?:1[6-9]|[2-9]\d)?\d{2})$
источник
2017 February 11

NK

ID:328943378 in Dev Chat
how to get the username of the chat. for me its coming blank.
источник

NK

ID:328943378 in Dev Chat
let _phonenumber;
$.sendMessage(Hi @${_username}, Please share your contact info using below button 'Share Contact' Button, {
   reply_markup: JSON.stringify({
           keyboard: [[ { text: 'Share contact', request_contact: true } ]]
   })
});
$.waitForRequest.then($ => {
   ($.message.contact) && ($.message.contact.phoneNumber) && (_phonenumber = $.message.contact.phoneNumber );
   console.log("$.message.contact.phoneNumber = ", _phonenumber || "");
   // At this point I have to hide "Share Contact" button from footer" ... ???"
})
источник

NK

ID:328943378 in Dev Chat
how to hide the contact number button as soon as the user pressed it.
источник

NK

ID:39602225 in Dev Chat
You ask to hide the custom keyboard to come back to the qwerty one? Yashko helped me with that a few days ago, try this:
источник

NK

ID:39602225 in Dev Chat
$.sendMessage("text", { reply_markup: JSON.stringify({ remove_keyboard: true }) } );
источник

SB

Svante Bengtson in Dev Chat
forgot to say hi yesterday, so i'll do it now. i might be missreading sonmething in the reference here, but how do you properly bold parts of the message with the bot?
источник

SB

Svante Bengtson in Dev Chat
apparently it isnt't <b>
источник

SB

Svante Bengtson in Dev Chat
oh wait, got it
источник

1

1C-Bitrix in Dev Chat
you have to send parse_mode 'html' option
источник

SB

Svante Bengtson in Dev Chat
sendMessage("text", {"parse_mode": "html"})
источник

SB

Svante Bengtson in Dev Chat
yeah, just figured that out 😅thanks
источник

NK

ID:328943378 in Dev Chat
ID:39602225
$.sendMessage("text", { reply_markup: JSON.stringify({ remove_keyboard: true }) } );
I saw this earlier. The problem is that I need to send some message. And according to my logic. As soon as they send the contract numbers. The button should disappear. I can use this and is working. But need to send some message along
источник

SB

Svante Bengtson in Dev Chat
gah i must be missing sonething out completely... if i get an inlineQuery and have it in scope and say I want it to show some article as "suggestion"/result, where do i get InlineQueryResultAricle from, and how do i properly call it
источник

SB

Svante Bengtson in Dev Chat
I should $.api.answer() right? and then i'll have to pass an array of InputQueryResults to it?
источник

SB

Svante Bengtson in Dev Chat
and how do i create a result properly?
источник

SB

Svante Bengtson in Dev Chat
the reference isn't particulary clear on that
источник

UR

Uncle Robot in Dev Chat
Вроде было, но не нашел: как узнать, что это master, а это worker?
источник