def reset_welcome(update, context) -> str: chat = update.effective_chat user = update.effective_user sql.set_custom_welcome(chat.id, None, sql.DEFAULT_WELCOME, sql.Types.TEXT) update.effective_message.reply_text( "Berhasil menyetel ulang pesan selamat datang ke default!") return ("<b>{}:</b>" "\n#RESET_WELCOME" "\n<b>Admin:</b> {}" "\nSetel ulang pesan selamat datang ke default.".format( escape(chat.title), mention_html(user.id, user.first_name)))
def set_welcome(update, context) -> str: chat = update.effective_chat user = update.effective_user msg = update.effective_message text, data_type, content, buttons = get_welcome_type(msg) if data_type is None: msg.reply_text("Anda tidak menentukan harus membalas dengan apa!") return "" sql.set_custom_welcome(chat.id, content, text, data_type, buttons) msg.reply_text("Successfully set custom welcome message!") return (f"<b>{html.escape(chat.title)}:</b>\n" f"#SET_WELCOME\n" f"<b>Admin:</b> {mention_html(user.id, user.first_name)}\n" f"Set the welcome message.")
def set_welcome(update, context) -> str: chat = update.effective_chat user = update.effective_user msg = update.effective_message text, data_type, content, buttons = get_welcome_type(msg) if data_type is None: msg.reply_text("Anda tidak menentukan harus membalas dengan apa!") return "" sql.set_custom_welcome(chat.id, content, text, data_type, buttons) msg.reply_text("Berhasil menyetel pesan selamat datang kustom!") return ("<b>{}:</b>" "\n#SET_WELCOME" "\n<b>Admin:</b> {}" "\nAtur pesan selamat datang.".format( escape(chat.title), mention_html(user.id, user.first_name)))