-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmsgSystem.js
More file actions
26 lines (23 loc) · 790 Bytes
/
msgSystem.js
File metadata and controls
26 lines (23 loc) · 790 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
module.exports = (bot) => {
// bot.onText(/\/echo (.+)/, (msg, match) => {
// // 'msg' is the received Message from Telegram
// // 'match' is the result of executing the regexp above on the text content
// // of the message
// const chatId = msg.chat.id;
// const resp = match[1]; // the captured "whatever"
// // send back the matched "whatever" to the chat
// bot.sendMessage(chatId, resp);
// });
// bot.onText(/\/love/, function onLoveText(msg) {
// const opts = {
// reply_to_message_id: msg.message_id,
// reply_markup: JSON.stringify({
// keyboard: [
// ['Yes, you are the bot of my life ❤'],
// ['No, sorry there is another one...']
// ]
// })
// };
// bot.sendMessage(msg.chat.id, 'Do you love me?', opts);
// });
}