def report_setting(bot: Bot, update: Update, args: List[str]): chat = update.effective_chat msg = update.effective_message if chat.type == chat.PRIVATE: if len(args) >= 1: if args[0] in ("yes", "on"): sql.set_user_setting(chat.id, True) msg.reply_text("Raporlama etkinleştirildi! Birisi bir şey raporladığında bildirim alırsınız.") elif args[0] in ("no", "off"): sql.set_user_setting(chat.id, False) msg.reply_text("Raporlama kapatıldı! Rapor almazsın.") else: msg.reply_text(f"Mevcut rapor tercihiniz: `{sql.user_should_report(chat.id)}`", parse_mode=ParseMode.MARKDOWN) else: if len(args) >= 1: if args[0] in ("yes", "on"): sql.set_chat_setting(chat.id, True) msg.reply_text("Raporlama etkinleştirildi! Raporları açmış olan yöneticilere, /report " "veya @admin denir.") elif args[0] in ("no", "off"): sql.set_chat_setting(chat.id, False) msg.reply_text("Raporlama kapatıldı! Hiçbir yöneticiye bildirilmez /report yada @admin.") else: msg.reply_text(f"Bu grubun geçerli ayarı: `{sql.chat_should_report(chat.id)}`", parse_mode=ParseMode.MARKDOWN)
def report_setting(update: Update, context: CallbackContext): bot, args = context.bot, context.args chat = update.effective_chat msg = update.effective_message if chat.type == chat.PRIVATE: if len(args) >= 1: if args[0] in ("yes", "on"): sql.set_user_setting(chat.id, True) msg.reply_text( "Turned on reporting! You'll be notified whenever anyone reports something." ) elif args[0] in ("no", "off"): sql.set_user_setting(chat.id, False) msg.reply_text( "Turned off reporting! You wont get any reports.") else: msg.reply_text( f"Your current report preference is: `{sql.user_should_report(chat.id)}`", parse_mode=ParseMode.MARKDOWN, ) else: if len(args) >= 1: if args[0] in ("yes", "on"): sql.set_chat_setting(chat.id, True) msg.reply_text( "Turned on reporting! Admins who have turned on reports will be notified when /report " "or @admin is called.") elif args[0] in ("no", "off"): sql.set_chat_setting(chat.id, False) msg.reply_text( "Turned off reporting! No admins will be notified on /report or @admin." ) else: msg.reply_text( f"This group's current setting is: `{sql.chat_should_report(chat.id)}`", parse_mode=ParseMode.MARKDOWN, )
def report_setting(update: Update, context: CallbackContext): bot, args = context.bot, context.args chat = update.effective_chat msg = update.effective_message if chat.type == chat.PRIVATE: if len(args) >= 1: if args[0] in ("yes", "on"): sql.set_user_setting(chat.id, True) msg.reply_text( "Hesabat modu aktivləşdirildi! Kimsə bir şeyi report etdik də xəbərdar olacaqsınız." ) elif args[0] in ("no", "off"): sql.set_user_setting(chat.id, False) msg.reply_text( "Hesabat modu deaktivləşdirildi! Artıq report'lardan xəbərdar olmayacaqsınız." ) else: msg.reply_text( f" Hazırkı hesabat seçiminiz budur: `{sql.user_should_report(chat.id)}`", parse_mode=ParseMode.MARKDOWN) else: if len(args) >= 1: if args[0] in ("yes", "on"): sql.set_chat_setting(chat.id, True) msg.reply_text( "Hesabat verməyə başlandı! Hesabat modunu aktivləşdirən adminlərə /report " "və @admin deyildik xəbərdar ediləcəklər.") elif args[0] in ("no", "off"): sql.set_chat_setting(chat.id, False) msg.reply_text( "Artıq hesabat verilmir! /report və @admin yazdıq da adminlər xəbərdar olmayacaq." ) else: msg.reply_text( f"Bu qrupun hazırki ayarı: `{sql.chat_should_report(chat.id)}`", parse_mode=ParseMode.MARKDOWN)
def report_setting(update: Update, context: CallbackContext): bot, args = context.bot, context.args chat = update.effective_chat msg = update.effective_message if chat.type == chat.PRIVATE: if len(args) >= 1: if args[0] in ("yes", "on"): sql.set_user_setting(chat.id, True) msg.reply_text( "Hesabat verməyə başladı! Hər kəs bir şey barədə məlumat verəndə xəbərdar olacaqsınız." ) elif args[0] in ("no", "off"): sql.set_user_setting(chat.id, False) msg.reply_text( "Hesabat vermə söndürüldü! Heç bir hesabat almayacaqsınız.") else: msg.reply_text( f"Hazırkı hesabat seçiminiz: `{sql.user_should_report(chat.id)}`", parse_mode=ParseMode.MARKDOWN) else: if len(args) >= 1: if args[0] in ("yes", "on"): sql.set_chat_setting(chat.id, True) msg.reply_text( "Hesabat verməyə başladı! Hesabatları açan rəhbərlərə nə vaxt / hesabat verildiyi bildirilir" "və ya @admin adlanır.") elif args[0] in ("no", "off"): sql.set_chat_setting(chat.id, False) msg.reply_text( "Hesabat vermə söndürüldü! Heç bir administrator /report və ya @admin barədə xəbərdar edilməyəcəkdir." ) else: msg.reply_text( f"Bu qrupun cari ayarı: `{sql.chat_should_report(chat.id)}`", parse_mode=ParseMode.MARKDOWN)
def report_setting(update: Update, context: CallbackContext): bot, args = context.bot, context.args chat = update.effective_chat msg = update.effective_message if chat.type == chat.PRIVATE: if len(args) >= 1: if args[0] in ("ya", "on"): sql.set_user_setting(chat.id, True) msg.reply_text( "Fitur Laporkan dinyalakan! kamu bakal dapat notif kalo ada yang melapor" ) elif args[0] in ("ga", "off"): sql.set_user_setting(chat.id, False) msg.reply_text( "Fitur Laporkan dimatikan. Kamu ga akan dapat laporan apa apa.") else: msg.reply_text( f"Fitur Laporkan sedang: `{sql.user_should_report(chat.id)}`", parse_mode=ParseMode.MARKDOWN) else: if len(args) >= 1: if args[0] in ("ya", "on"): sql.set_chat_setting(chat.id, True) msg.reply_text( "Fitur Laporkan dinyalakan! Laporan dari perintah /lapor akan dikirimkan ke admin." "Atau ketika @admin dipanggil") elif args[0] in ("ga", "off"): sql.set_chat_setting(chat.id, False) msg.reply_text( "Fitur dimatikan. Ga bakal ada admin dinotif ketika ada yang me /lapor kan" ) else: msg.reply_text( f"Fitur Laporkan sedang: `{sql.chat_should_report(chat.id)}`", parse_mode=ParseMode.MARKDOWN)