{"action":"opened","issue":{"url":"https://api.github.com/repos/eternnoir/pyTelegramBotAPI/issues/66","labels_url":"https://api.github.com/repos/eternnoir/pyTelegramBotAPI/issues/66/labels{/name}","comments_url":"https://api.github.com/repos/eternnoir/pyTelegramBotAPI/issues/66/comments","events_url":"https://api.github.com/repos/eternnoir/pyTelegramBotAPI/issues/66/events","html_url":"https://github.com/eternnoir/pyTelegramBotAPI/issues/66","id":103942538,"number":66,"title":"problem in register_next_step_handler function","user":{"login":"IRRN","id":10836577,"avatar_url":"https://avatars.githubusercontent.com/u/10836577?v=3","gravatar_id":"","url":"https://api.github.com/users/IRRN","html_url":"https://github.com/IRRN","followers_url":"https://api.github.com/users/IRRN/followers","following_url":"https://api.github.com/users/IRRN/following{/other_user}","gists_url":"https://api.github.com/users/IRRN/gists{/gist_id}","starred_url":"https://api.github.com/users/IRRN/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IRRN/subscriptions","organizations_url":"https://api.github.com/users/IRRN/orgs","repos_url":"https://api.github.com/users/IRRN/repos","events_url":"https://api.github.com/users/IRRN/events{/privacy}","received_events_url":"https://api.github.com/users/IRRN/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-08-30T19:55:42Z","updated_at":"2015-08-30T19:55:42Z","closed_at":null,"body":"if I have a code something like this:\r\n```python\r\n@bot.message_handler(commands=['config'])\r\ndef set_config(message):\r\n    bot.reply_to(message, 'enter password')\r\n    bot.register_next_step_handler(message, check_password)\r\n\r\ndef check_password(message):\r\n    text = message.text\r\n    if text == password:\r\n        bot.reply_to(message, 'OK')\r\n        bot.register_next_step_handler(message, next_step_func)\r\n    else:\r\n        bot.reply_to(message, 'Invalid password')\r\n        bot.register_next_step_handler(message, check_password)\r\n```\r\nIf a person send for my bot `/config` and when I ask them to type password maybe he/she send me `/config` again. so `set_config()` and `check_password()` called together.\r\nhow can I solve this problem? :)"}}