def filter(self, message) -> bool: if get_debug(): return True return message.from_user.id in { a.user.id for a in message.chat.get_administrators() }
def filter(self, message: Message) -> bool: if get_debug(): return True if message.reply_to_message is not None: return message.from_user.id in { a.user.id for a in message.chat.get_administrators() } return True
def debug(self, number): if not config.get_debug(): return print('') print(number) print(f'current_text = {self.key.current_text}') print(f'current_cursor = {self.key.current_cursor}') print(f'display_text = {self.key.get_contents()}') print(f'display_cursor = {self.key.get_cursor()}') print(f'suggestion_text = {self.key.suggestion_text}') print(f'suggestion_list = {self.key.suggestion_list}')
def filter(self, message: Message) -> Optional[Union[bool, DataDict]]: if get_debug(): return True return _trusted_db.is_trusted(message.from_user.id)