Closed m0x61h0x64i closed 11 months ago
var users = new Map();
bot.onText(/\/start/, (msg) => {
if (users.get(msg.chat.id) === 'undefined') {
//first "start"
users.set(msg.chat.id, 1)
//...
} else {
//...
}
})
Hello, i want to stop listening for '/start' command when the user enters '/start', i have tried
bot.removeTextListener(/\/start/)
but this will remove listening for all users, i only want to stop listening for a specific user, how can i do this ?my code is :