def allow_connections(bot: Bot, update: Update, args: List[str]): chat = update.effective_chat if chat.type != chat.PRIVATE: if len(args) >= 1: var = args[0] if var == "no": sql.set_allow_connect_to_chat(chat.id, False) send_message(update.effective_message, "Connection has been disabled for this chat") elif var == "yes": sql.set_allow_connect_to_chat(chat.id, True) send_message(update.effective_message, "Connection has been enabled for this chat") else: send_message(update.effective_message, "Please enter `yes` or `no`!", parse_mode=ParseMode.MARKDOWN) else: get_settings = sql.allow_connect_to_chat(chat.id) if get_settings: send_message( update.effective_message, "Connections to this group are *Allowed* for members!", parse_mode=ParseMode.MARKDOWN) else: send_message( update.effective_message, "Connection to this group are *Not Allowed* for members!", parse_mode=ParseMode.MARKDOWN) else: send_message(update.effective_message, "This command is for group only. Not in PM!")
def allow_connections(bot: Bot, update: Update, args: List[str]): chat = update.effective_chat if chat.type != chat.PRIVATE: if len(args) >= 1: var = args[0] if var == "no": sql.set_allow_connect_to_chat(chat.id, False) send_message(update.effective_message, "Koneksi telah terputus di grup ini") elif var == "yes": sql.set_allow_connect_to_chat(chat.id, True) send_message(update.effective_message, "Telah terkoneksi dengan grup ini") else: send_message(update.effective_message, "Ketik `yes` atau `no`!", parse_mode=ParseMode.MARKDOWN) else: get_settings = sql.allow_connect_to_chat(chat.id) if get_settings: send_message( update.effective_message, "Connections ke grup ini *Diizinkan* untuk anggota!", parse_mode=ParseMode.MARKDOWN) else: send_message( update.effective_message, "Koneksi ke grup ini *Tidak diizinkan* untuk anggota!", parse_mode=ParseMode.MARKDOWN) else: send_message(update.effective_message, "Perintah ini untuk di grup. Bukan di PM!")
def allow_connections(bot: Bot, update: Update, args: List[str]) -> str: chat = update.effective_chat # type: Optional[Chat] if chat.type != chat.PRIVATE and len(args) >= 1: var = args[0] print(var) if (var == "no"): sql.set_allow_connect_to_chat(chat.id, False) update.effective_message.reply_text("Disabled connections to this chat for users") elif(var == "yes"): sql.set_allow_connect_to_chat(chat.id, True) update.effective_message.reply_text("Enabled connections to this chat for users") else: update.effective_message.reply_text("Please enter on/yes/off/no in group!") else: update.effective_message.reply_text("Please enter on/yes/off/no in group!")
def allow_connections(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] print(var) if (var == "no"): sql.set_allow_connect_to_chat(chat.id, False) update.effective_message.reply_text("Kullanıcılar için bu sohbete devre dışı bırakılan bağlantılar") elif(var == "yes"): sql.set_allow_connect_to_chat(chat.id, True) update.effective_message.reply_text("Kullanıcılar için bu sohbete etkin bağlantılar") else: update.effective_message.reply_text("Lütfen gruba giriş on/yes/off/no!") else: update.effective_message.reply_text("Lütfen gruba on/yes/off/no!") else: update.effective_message.reply_text("Lütfen gruba on/yes/off/no!")
def allow_connections(bot: Bot, update: Update, args: List[str]): chat = update.effective_chat if chat.type != chat.PRIVATE: if len(args) >= 1: var = args[0] if var == "no": sql.set_allow_connect_to_chat(chat.id, False) send_message( update.effective_message, "Connection has been disabled for this chat", ) elif var == "yes": sql.set_allow_connect_to_chat(chat.id, True) send_message( update.effective_message, "Koneksi telah diaktifkan untuk obrolan ini", ) else: send_message( update.effective_message, "Silakan masuk `yes` atau `no`!", parse_mode=ParseMode.MARKDOWN, ) else: get_settings = sql.allow_connect_to_chat(chat.id) if get_settings: send_message( update.effective_message, "Koneksi ke grup ini *Diizinkan* untuk anggota!", parse_mode=ParseMode.MARKDOWN, ) else: send_message( update.effective_message, "Koneksi ke grup ini *Tidak Diizinkan* untuk anggota!", parse_mode=ParseMode.MARKDOWN, ) else: send_message(update.effective_message, "Perintah ini hanya untuk grup. Tidak di PM!")
def allow_connections(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] print(var) if (var == "no"): sql.set_allow_connect_to_chat(chat.id, False) update.effective_message.reply_text( "यूजर के लिए इस चैट में बंद कनेक्शन") elif (var == "yes"): sql.set_allow_connect_to_chat(chat.id, True) update.effective_message.reply_text( "यूजर के लिए इस चैट में सक्रिय कनेक्शन") else: update.effective_message.reply_text( "कृप्या ग्रुप में on/yes/off/no टाइप करे!") else: update.effective_message.reply_text( "कृप्या ग्रुप में on/yes/off/no टाइप करे!") else: update.effective_message.reply_text( "कृप्या ग्रुप में on/yes/off/no टाइप करे!")
def allow_connections(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] print(var) if (var == "no"): sql.set_allow_connect_to_chat(chat.id, False) update.effective_message.reply_text( "Wyłączono połączenia do tego czatu dla futrzaków") elif (var == "yes"): sql.set_allow_connect_to_chat(chat.id, True) update.effective_message.reply_text( "Włączono połączenia do tego czatu dla futrzaków") else: update.effective_message.reply_text( "Proszę wpisać on/yes/off/no na grupie!") else: update.effective_message.reply_text( "Proszę wpisać on/yes/off/no na grupie!") else: update.effective_message.reply_text( "Proszę wpisać on/yes/off/no na grupie!")
def allow_connections(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] print(var) if (var == "no"): sql.set_allow_connect_to_chat(chat.id, False) update.effective_message.reply_text( "පරිශීලකයින් සඳහා මෙම කතාබහට අක්රීය සම්බන්ධතා") elif (var == "yes"): sql.set_allow_connect_to_chat(chat.id, True) update.effective_message.reply_text( "පරිශීලකයින් සඳහා මෙම කතාබස් වෙත සම්බන්ධතා සබල කර ඇත") else: update.effective_message.reply_text( "කරුණාකර ඇතුලත් කරන්න on/yes/off/no කණ්ඩායමේ!") else: update.effective_message.reply_text( "කරුණාකර ඇතුලත් කරන්න on/yes/off/no කණ්ඩායමේ!") else: update.effective_message.reply_text( "කරුණාකර ඇතුලත් කරන්න on/yes/off/no කණ්ඩායමේ!")
def allow_connections(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] print(var) if (var == "no"): sql.set_allow_connect_to_chat(chat.id, False) update.effective_message.reply_text( "Bu söhbətlə əlaqələr istifadəçilər üçün deaktiv edildi.") elif (var == "yes"): sql.set_allow_connect_to_chat(chat.id, True) update.effective_message.reply_text( "Bu söhbətlə əlaqələr istifadəçilər üçün aktiv edildi") else: update.effective_message.reply_text( "Zəhmət olmasa on/yes/off/no daxil edin!") else: update.effective_message.reply_text( "Zəhmət olmasa on/yes/off/no daxil edin!") else: update.effective_message.reply_text( "Zəhmət olmasa on/yes/off/no daxil edin!")
def allow_connections(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] print(var) if (var == "no"): sql.set_allow_connect_to_chat(chat.id, False) update.effective_message.reply_text( "اتصالات المعوقين إلى هذه الدردشة للمستخدمين") elif (var == "yes"): sql.set_allow_connect_to_chat(chat.id, True) update.effective_message.reply_text( "جهات الاتصالات ممكنة إلى هذه الدردشة للمستخدمين") else: update.effective_message.reply_text( "رجاء ادخل on/yes/off/no في المجموعة!") else: update.effective_message.reply_text( "رجاء ادخل on/yes/off/no في المجموعة!") else: update.effective_message.reply_text( "رجاء ادخل on/yes/off/no في المجموعة!")
def allow_connections(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] print(var) if (var == "no"): sql.set_allow_connect_to_chat(chat.id, False) update.effective_message.reply_text( "İstifadəçilər üçün bu söhbətin bağlanması") elif (var == "yes"): sql.set_allow_connect_to_chat(chat.id, True) update.effective_message.reply_text( "İstifadəçilər üçün bu söhbətin aktivləşdirilməsi") else: update.effective_message.reply_text( "Zəhmət olmasa qrupa daxil edin on / yes / off / no!") else: update.effective_message.reply_text( "Zəhmət olmasa qrupa daxil edin on / yes / off / no!") else: update.effective_message.reply_text( "Zəhmət olmasa qrupa daxil edin on / yes / off / no!")
def allow_connections(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] print(var) if (var == "no"): sql.set_allow_connect_to_chat(chat.id, False) update.effective_message.reply_text( "Disabled connections to this chat for users") elif (var == "yes"): sql.set_allow_connect_to_chat(chat.id, True) update.effective_message.reply_text( "Enabled connections to this chat for users") else: update.effective_message.reply_text( "Please enter yes or no!", parse_mode=ParseMode.MARKDOWN) else: update.effective_message.reply_text("Please enter yes or no!", parse_mode=ParseMode.MARKDOWN) else: update.effective_message.reply_text( "Please enter yes or no in your group!", parse_mode=ParseMode.MARKDOWN)