1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Compare commits

..

No commits in common. "110575ca40934be1887c326f56652b38ab69f0ba" and "1688a466f44e9a2dccf2fb7aee6ad71b222982fc" have entirely different histories.

4 changed files with 2 additions and 6 deletions

View File

@ -3849,9 +3849,6 @@ class TeleBot:
elif len(params) == 3:
if params[2] == 'bot' and handler.get('pass_bot') is True:
handler['function'](message, data, self)
elif not handler.get('pass_bot'):
raise RuntimeError('Your handler accepts 3 parameters but pass_bot is False. Please re-check your handler.')
else:
handler['function'](message, self, data)

View File

@ -303,7 +303,7 @@ class StateFilter(AdvancedCustomFilter):
group_state = await self.bot.current_states.get_state(user_id, chat_id)
if group_state == text:
return True
elif type(text) is list and group_state in text:
elif group_state in text and type(text) is list:
return True

View File

@ -67,7 +67,6 @@ async def _process_request(token, url, method='get', params=None, files=None, re
logger.debug("Request: method={0} url={1} params={2} files={3} request_timeout={4} current_try={5}".format(method, url, params, files, request_timeout, current_try).replace(token, token.split(':')[0] + ":{TOKEN}"))
json_result = await _check_result(url, resp)
if json_result:
got_result = True
return json_result['result']
except (ApiTelegramException,ApiInvalidJSONException, ApiHTTPException) as e:
raise e

View File

@ -311,7 +311,7 @@ class StateFilter(AdvancedCustomFilter):
group_state = self.bot.current_states.get_state(user_id, chat_id)
if group_state == text:
return True
elif type(text) is list and group_state in text:
elif group_state in text and type(text) is list:
return True