def cleanservice(update: Update, context: CallbackContext) -> str: args = context.args chat = update.effective_chat # type: Optional[Chat] if chat.type != chat.PRIVATE: if len(args) >= 1: var = args[0] if var in ("no", "off"): sql.set_clean_service(chat.id, False) update.effective_message.reply_text( "Welcome clean service is : off") elif var in ("yes", "on"): sql.set_clean_service(chat.id, True) update.effective_message.reply_text( "Welcome clean service is : on") else: update.effective_message.reply_text( "Invalid option", parse_mode=ParseMode.MARKDOWN) else: update.effective_message.reply_text( "Usage is on/yes or off/no", parse_mode=ParseMode.MARKDOWN) else: curr = sql.clean_service(chat.id) if curr: update.effective_message.reply_text( "Welcome clean service is : on", parse_mode=ParseMode.MARKDOWN) else: update.effective_message.reply_text( "Welcome clean service is : off", parse_mode=ParseMode.MARKDOWN)
def cleanservice(update: Update, context: CallbackContext) -> str: args = context.args chat = update.effective_chat # type: Optional[Chat] if chat.type != chat.PRIVATE: if len(args) >= 1: var = args[0] if var in ("no", "off"): sql.set_clean_service(chat.id, False) update.effective_message.reply_text( "Servis mesajı silmə ayarı : off") elif var in ("yes", "on"): sql.set_clean_service(chat.id, True) update.effective_message.reply_text( "Servis mesajı silmə ayarı : on") else: update.effective_message.reply_text("Xətalı seçim", parse_mode=ParseMode.HTML) else: update.effective_message.reply_text( "İstifadəsi <code>on</code>/<code>yes</code> və ya <code>off</code>/<code>no</code>", parse_mode=ParseMode.HTML) else: curr = sql.clean_service(chat.id) if curr: update.effective_message.reply_text( "Servis mesajı silmə ayarı : <code>on</code>", parse_mode=ParseMode.HTML) else: update.effective_message.reply_text( "Servis mesajı silmə ayarı: <code>off</code>", parse_mode=ParseMode.HTML)
def cleanservice(bot: Bot, update: Update, args: List[str]) -> str: chat = update.effective_chat # type: Optional[Chat] if chat.type != chat.PRIVATE: if len(args) >= 1: var = args[0] if (var == "no" or var == "off"): sql.set_clean_service(chat.id, False) update.effective_message.reply_text( 'Karşılama temiz hizmet : off') elif (var == "yes" or var == "on"): sql.set_clean_service(chat.id, True) update.effective_message.reply_text( 'Karşılama temiz hizmet : on') else: update.effective_message.reply_text( "Geçersiz seçenek", parse_mode=ParseMode.MARKDOWN) else: update.effective_message.reply_text("Kullanımı on/yes or off/no", parse_mode=ParseMode.MARKDOWN) else: curr = sql.clean_service(chat.id) if curr: update.effective_message.reply_text('Karşılama temiz hizmet : on', parse_mode=ParseMode.MARKDOWN) else: update.effective_message.reply_text('Karşılama temiz hizmet : off', parse_mode=ParseMode.MARKDOWN)
def cleanservice(update: Update, context: CallbackContext) -> str: args = context.args chat = update.effective_chat # type: Optional[Chat] if chat.type == chat.PRIVATE: curr = sql.clean_service(chat.id) if curr: update.effective_message.reply_text( "Welcome clean service is : <code>on</code>", parse_mode=ParseMode.HTML, ) else: update.effective_message.reply_text( "Welcome clean service is : <code>off</code>", parse_mode=ParseMode.HTML, ) elif len(args) >= 1: var = args[0] if var in ("no", "off"): sql.set_clean_service(chat.id, False) update.effective_message.reply_text("Welcome clean service is : off") elif var in ("yes", "on"): sql.set_clean_service(chat.id, True) update.effective_message.reply_text("Welcome clean service is : on") else: update.effective_message.reply_text( "Invalid option", parse_mode=ParseMode.HTML, ) else: update.effective_message.reply_text( "Usage is <code>on</code>/<code>yes</code> or <code>off</code>/<code>no</code>", parse_mode=ParseMode.HTML, )
def cleanservice(bot: Bot, update: Update, args: List[str]) -> str: chat = update.effective_chat # type: Optional[Chat] if chat.type != chat.PRIVATE: if len(args) >= 1: var = args[0] if (var == "no" or var == "off"): sql.set_clean_service(chat.id, False) update.effective_message.reply_text( 'Welcome clean service is : off') elif (var == "yes" or var == "on"): sql.set_clean_service(chat.id, True) update.effective_message.reply_text( 'Welcome clean service is : on') else: update.effective_message.reply_text( "Invalid option", parse_mode=ParseMode.MARKDOWN) else: update.effective_message.reply_text("Usage is on/yes or off/no", parse_mode=ParseMode.MARKDOWN) else: curr = sql.clean_service(chat.id) if curr: update.effective_message.reply_text( 'Welcome clean service is : on', parse_mode=ParseMode.MARKDOWN) else: update.effective_message.reply_text( 'Welcome clean service is : off', parse_mode=ParseMode.MARKDOWN)
def cleanservice(update: Update, context: CallbackContext) -> str: args = context.args chat = update.effective_chat # type: Optional[Chat] if chat.type != chat.PRIVATE: if len(args) >= 1: var = args[0] if var in ("no", "off"): sql.set_clean_service(chat.id, False) update.effective_message.reply_text( "La eliminación de la bienvenida es: off") elif var in ("yes", "on"): sql.set_clean_service(chat.id, True) update.effective_message.reply_text( "La eliminación de la bienvenida es: on") else: update.effective_message.reply_text( "Opción inválida", parse_mode=ParseMode.HTML) else: update.effective_message.reply_text( "El uso es <code>on</code>/<code>yes</code> o <code>off</code>/<code>no</code>", parse_mode=ParseMode.HTML) else: curr = sql.clean_service(chat.id) if curr: update.effective_message.reply_text( "La eliminación de la bienvenida es: <code>on</code>", parse_mode=ParseMode.HTML) else: update.effective_message.reply_text( "La eliminación de la bienvenida es: <code>off</code>", parse_mode=ParseMode.HTML)
def cleanservice(update: Update, context: CallbackContext) -> str: args = context.args chat = update.effective_chat # type: Optional[Chat] if chat.type != chat.PRIVATE: if len(args) >= 1: var = args[0] if var in ("no", "off"): sql.set_clean_service(chat.id, False) update.effective_message.reply_text( "Karşılama temizliği hizmeti : off") elif var in ("yes", "on"): sql.set_clean_service(chat.id, True) update.effective_message.reply_text( "Karşılama temizliği hizmeti : on") else: update.effective_message.reply_text("Geçersiz seçenek", parse_mode=ParseMode.HTML) else: update.effective_message.reply_text( "Kullanım <code>on</code>/<code>yes</code> or <code>off</code>/<code>no</code>", parse_mode=ParseMode.HTML) else: curr = sql.clean_service(chat.id) if curr: update.effective_message.reply_text( "Hoş geldiniz temiz hizmeti : <code>on</code>", parse_mode=ParseMode.HTML) else: update.effective_message.reply_text( "Hoş geldiniz temiz hizmeti : <code>off</code>", parse_mode=ParseMode.HTML)