def todo_description(update, context): user = update.message.from_user # logger.info("Description of %s: %s", user.name, update.message.text) chat_id = update.message.chat_id botManager.send_message( update=update, chat_id=chat_id, text=_("In which category will you include it?"), reply_markup=todo_category_keyboard_content(chat_id, todolist=False), ) print('after send') # Check if user or chat exist in database and if not, insert them db.checkDatabase(chat_id=chat_id, user_id=user.id) print('after check') # Update model db.setPendingTodosDescription( chat_id=chat_id, user_id=update.message.from_user.id, description=update.message.text, ) print('after set') return CATEGORY
def run(): configurator.updateConfig() database.checkDatabase() application = wx.App(False) frame = mainWindow.MainWindow(None, "Fennek") frame.Show(True) application.MainLoop()
def isConnected(): exists = database.checkDatabase() if exists: servers = getServers() if len(servers) > 0: return True else: return False
def general_check(update, context): chat_id = update.message.chat_id user_id = update.effective_user.id # Check if user or chat exist in database and if not, insert them db.checkDatabase(chat_id=chat_id, user_id=user_id)