@ChanMBot 6.1

In this update we will add /md and /html to inline!

bot.on('inlineQuery', msg => {
  let query = msg.query;
  let answers = bot.answerList(msg.id);

  if (query.startsWith('/html ')) {
    query = query.replace('/html ', '');
    answers.addArticle({
      id: 'html',
      title: 'HTML',
      description: `${query}`,
      message_text: `${query}`,
      parse_mode: 'html',
      disable_web_page_preview: true
    });
  } else if (query.startsWith('/md')) {
    answers.addArticle({
      id: 'markdown',
      title: 'Markdown',
      description: `${query}`,
      message_text: `${query}`,
      parse_mode: 'markdown',
      disable_web_page_preview: true
    });
  }

  return bot.answerQuery(answers);
});

@ChanMBot 5.2

Here I am with another update!

In this update we will add a way to get the id of other users

if you check the events section on the telebot github repository you can see forward

so we do it like this:

bot.on(['forward'], (msg) => {
  let id = msg.chat.id;
  let replyToMessage = msg.message_id;
  let parseMode = 'markdown';
  let ff = msg.forward_from;

  return bot.sendMessage(id, `From First Name: \`${ff.first_name}\`
From Last Name: \`${ff.last_name}\`
From Username: \`${ff.username}\`
From ID: \`${ff.id}\``, {parseMode, replyToMessage});
  }
});

and every time you forward a message from any user it will return a message with the first name, last name, username and id!

@ChanMBot 5.0

In this update we will add a /feedback command and a /send to reply.

First we will add /feedback:

bot.on(['/feedback'], (msg) => {
 let id = msg.from.id;
 let replyToMessage = msg.message_id;
 let replyMarkup = 'reply';

return bot.sendMessage(id, `Please send your feedback`, {replyToMessage, ask: 'feedback', replyMarkup});
});

bot.on(['ask.feedback'], (msg) => {
 let id = msg.from.id;
 let replyToMessage = msg.message_id;
 let parseMode = 'markdown';

if (msg.text == '/cancel') {
 return bot.sendMessage(id, "I've canceled that!", {replyToMessage});
 } else {
 return bot.sendMessage(id, `Thanks for the feedback`, {replyToMessage}), bot.sendMessage(YOUR_ID, `[${msg.from.username}](tg://user?id=${id}) (\`${id}\`):\n\n${msg.text}`, {parseMode});
 } 
});

and replace YOUR_ID with your id.

 

Next we will add /send:

let send, send_message;

bot.on(['/send'], (msg) => {
 let id = msg.from.id;
 let replyToMessage = msg.message_id;

if (id === YOUR_ID && msg.text == '/cancel') {
 return bot.sendMessage(id, "I've canceled that");
 } else if (id === YOUR_ID && msg.text != '/cancel') {
 return bot.sendMessage(msg.from.id, `Who would you like to send a message to?`, {replyToMessage, ask: 'send_id'});
 }
});

bot.on(['ask.send_id'], (msg) => {
 let id = msg.from.id;
 let replyToMessage = msg.message_id;

if (id === YOUR_ID && msg.text == '/cancel') {
 return bot.sendMessage(id, "I've canceled that");
 } else if (id === YOUR_ID && msg.text != '/cancel') {
 return bot.sendMessage(id, `What would you like to send?`, {replyToMessage, ask: 'send_msg'}).then(() => send = `${msg.text}`).then(() => console.log(send));
 }
});

bot.on(['ask.send_msg'], (msg) => {
 let id = msg.from.id;
 let replyToMessage = msg.message_id;

if (id === YOUR_ID && msg.text == '/cancel') {
 return bot.sendMessage(id, "I've canceled that");
 } else if (id === YOUR_ID && msg.text != '/cancel') {
 return bot.sendMessage(id, `What would you like to send?`, {replyToMessage}).then(() => send_message = `${msg.text}`).then(() => console.log(send_message)).then(() => bot.sendMessage(send, `Message from the admin:\n\n${send_message}`));
 }
});

and again replace YOUR_ID with your id.

@ChanM 4.3

In part 2 we added /id but we need to fix the problem if the user doesnt have a username.

So we do it like this:

bot.on(['/id'], (msg, self) => {
  let id = msg.chat.id;
  let replyToMessage = msg.message_id;
  let username = msg.chat.username;
  let type = self.type;
  let parseMode = 'markdown';

  if (username != 'undefined') {
    return bot.sendMessage(id, `Chat ID: \`${id}\`
Message ID: \`${replyToMessage}\`
username: @${username}
t.me link: t.me/${username}
telegram link: [${msg.from.first_name}](tg://user?id=${ id })`, {replyToMessage, parseMode});
  } else {
    return bot.sendMessage(id, `Chat ID: \`${ id }\`
Message ID: \`${replyToMessage}\`
telegram link: [${msg.from.first_name}](tg://user?id=${ id })`, {replyToMessage, parseMode});
  }
});