def __user_info__(user_id): is_gbanned = sql.is_user_gbanned(user_id) text = "Dilarang secara global: <b>{}</b>" if is_gbanned: text = text.format("Yes") user = sql.get_gbanned_user(user_id) if user.reason: text += "\nAlasan: {}".format(html.escape(user.reason)) else: text = text.format("No") return text
def __user_info__(user_id, chat_id): is_gbanned = sql.is_user_gbanned(user_id) text = tl(user_id, "Globally banned: <b>{}</b>") if is_gbanned: text = text.format("Yes") user = sql.get_gbanned_user(user_id) if user.reason: text += "\nReason: {}".format(html.escape(user.reason)) else: text = text.format("No") return text