def set_goodbye(update, context) -> str: chat = update.effective_chat user = update.effective_user msg = update.effective_message if not msg.reply_to_message: if len(msg.text.split()) == 1: msg.reply_text( "Reply To Message Or media. Or using /welcomehelp If You don't Know what to do..", parse_mode="markdown", ) return "" text, data_type, content, buttons = get_welcome_type(msg) if data_type is None: msg.reply_text("You didn't specify what to reply with!") return "" sql.set_custom_gdbye(chat.id, content or text, data_type, buttons) msg.reply_text("Successfully set custom goodbye message!") return ("<b>{}:</b>" "\n#SET_GOODBYE" "\n<b>Admin:</b> {}" "\nSet the goodbye message.".format( escape(chat.title), mention_html(user.id, user.first_name)))
def set_goodbye(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("You didn't specify what to reply with!") return "" sql.set_custom_gdbye(chat.id, content or text, data_type, buttons) msg.reply_text("Successfully set custom goodbye message!") return ("<b>{}:</b>" "\n#SET_GOODBYE" "\n<b>Admin:</b> {}" "\nSet the goodbye message.".format( escape(chat.title), mention_html(user.id, user.first_name)))