def check_suggestion_limit(bot, update, user): cid = update.effective_chat.id if Suggestion.over_limit(user): bot.formatter.send_failure( cid, "You have reached the limit of {} suggestions. Please wait for " "the Moderators to approve of some of them.".format( settings.SUGGESTION_LIMIT)) Statistic.of(update, 'hit the suggestion limit') return True return False