Hello guys! I have a doubt!
I would like to invoke the bot by mentioning it
Ex: @bot and it responds me with a default message
I have understood your use case as sth like this:

You would just have to look at the message's text. For example,
bot.on("message", function(message) {
console.log(message.text); // => @botname
// checking that the text only includes mention of the bot i.e. @botname
// this can be improved of course to satisfy your use case!
const match = /^@\w+$/.exec(message.text.trim());
if (match) {
bot.sendMessage(message.chat.id, "default message");
}
});
Thanks @GochoMugo but only works without individual chat with the bot, when the mentioned in group chat happens
Most helpful comment
Thanks @GochoMugo but only works without individual chat with the bot, when the mentioned in group chat happens