def flood(bot: Bot, update: Update): chat = update.effective_chat # type: Optional[Chat] user = update.effective_user # type: Optional[User] msg = update.effective_message conn = connected(bot, update, chat, user.id, need_admin=False) if conn: chat_id = conn chat_name = dispatcher.bot.getChat(conn).title else: if update.effective_message.chat.type == "private": send_message(update.effective_message, "This command is meant to use in group not in PM") return chat_id = update.effective_chat.id chat_name = update.effective_message.chat.title limit = sql.get_flood_limit(chat_id) if limit == 0: if conn: text = msg.reply_text("I'm not enforcing any flood control in {}!".format(chat_name)) else: text = msg.reply_text("I'm not enforcing any flood control here!") else: if conn: text = msg.reply_text("I'm currently restricting members after {} consecutive messages in {}.".format(limit, chat_name)) else: text = msg.reply_text("I'm currently restricting members after {} consecutive messages.".format(limit))
def __chat_settings__(chat_id, user_id): limit = sql.get_flood_limit(chat_id) if limit == 0: return "*Not* currently enforcing flood control." else: return "മെസ്സേജ് നിയന്ത്രണം `{}` എന്നതിലേക്ക് ആക്കിയിരിക്കുന്നു .".format( limit)
def __chat_settings__(chat_id, user_id): limit = sql.get_flood_limit(chat_id) if limit == 0: return "*Aktuell nicht* aktiviert." else: return "Antiflood ist aktuell auf `{}` Nachrichten gesetzt.".format( limit)
def __chat_settings__(chat_id, user_id): limit = sql.get_flood_limit(chat_id) if limit == 0: return "Mevcut bir seri mesaj limiti *yok*" else: return "Seri mesaj limiti `{}` adettir. Fazlasını yazarsanız bozuşuruz.".format( limit)
def __chat_settings__(bot, update, chat, chatP, user): chat_id = chat.id limit = sql.get_flood_limit(chat_id) if limit == 0: return "*Not* currently enforcing flood control." else: return "Antiflood is set to `{}` messages.".format(limit)
def flood(bot: Bot, update: Update): chat = update.effective_chat # type: Optional[Chat] limit = sql.get_flood_limit(chat.id) if limit == 0: update.effective_message.reply_text("من در حال حاضر میزان تکرار رو کنترل نمیکنم") else: update.effective_message.reply_text( "حالت ضد تکرار من فعاله و کسانی که بیش از {} پیام متوالی بفرستن اخراج میشن!.".format(limit))
def flood(bot: Bot, update: Update): chat = update.effective_chat # type: Optional[Chat] limit = sql.get_flood_limit(chat.id) if limit == 0: update.effective_message.reply_text("saya tidak sedang mengontrol pesan") else: update.effective_message.reply_text( "jika melakukan {} pesan dalam waktu yang sama/spam saya akan mengeluarkannya dari group ".format(limit))
def flood(bot: Bot, update: Update): chat = update.effective_chat # type: Optional[Chat] limit = sql.get_flood_limit(chat.id) if limit == 0: update.effective_message.reply_text("Şu anda mesaj kontrolü yapmıyorum!") else: update.effective_message.reply_text( " {} Çörekleri mesajı aynı anda daha fazla gönderen kişiye bırakacağım.".format(limit))
def flood(update: Update, context: CallbackContext): chat = update.effective_chat # type: Optional[Chat] limit = sql.get_flood_limit(chat.id) if limit == 0: update.effective_message.reply_text(get_string("antiflood", "MSG_DISABLED", lang.get_lang(update.effective_chat.id))) # MSG_DISABLED else: update.effective_message.reply_text( get_string("antiflood", "MSG_INFO", lang.get_lang(update.effective_chat.id)).format(limit)) # MSG_INFO
def flood(bot: Bot, update: Update): chat = update.effective_chat # type: Optional[Chat] limit = sql.get_flood_limit(chat.id) if limit == 0: update.effective_message.reply_text("നിലവിൽ മെസ്സേജ് നിയന്ത്രണം നടത്തുന്നില്ല!") else: update.effective_message.reply_text( "ഒരേ സമയം {} മെസ്സേജിൽ കൂടുതൽ അയക്കുന്ന ആളെ ഇനി ബാൻ ചെയ്യുന്നതാണ്!".format(limit))
def flood(bot: Bot, update: Update): chat = update.effective_chat # type: Optional[Chat] limit = sql.get_flood_limit(chat.id) if limit == 0: update.effective_message.reply_text("I'm not currently enforcing flood control!") else: update.effective_message.reply_text( "I'm currently banning users if they send more than {} consecutive messages.".format(limit))
def flood(bot: Bot, update: Update): chat = update.effective_chat # type: Optional[Chat] limit = sql.get_flood_limit(chat.id) if limit == 0: update.effective_message.reply_text("I am not doing message control right now!") else: update.effective_message.reply_text( " {} I'll leave the bun to the person who sends the message more at the same time.".format(limit))
def flood(bot: Bot, update: Update): chat = update.effective_chat # type: Optional[Chat] limit = sql.get_flood_limit(chat.id) if limit == 0: update.effective_message.reply_text("ഞാൻ ഇപ്പോൾ മെസ്സേജ് നിയന്ത്രണം നടത്തുന്നില്ല !") else: update.effective_message.reply_text( " {} മെസ്സേജിൽ കൂടുതൽ ഒരേ സമയം അയക്കുന്ന ആളെ ഞാൻ ബൺ കൊടുത്ത് വിടുന്നതാണ്.".format(limit))
def flood(bot: Bot, update: Update): chat = update.effective_chat # type: Optional[Chat] limit = sql.get_flood_limit(chat.id) if limit == 0: update.effective_message.reply_text("Od teraz nie kontroluję wiadomości!") else: update.effective_message.reply_text( " {} Zostawię niespodziankę futrzakowi który wysyła więcej wiadomości na raz.".format(limit))
def flood(bot: Bot, update: Update): chat = update.effective_chat # type: Optional[Chat] limit = sql.get_flood_limit(chat.id) if limit == 0: update.effective_message.reply_text("دژەدووبارەبوونەوە ناچالاکە!") else: update.effective_message.reply_text( "لە ئێستادا ئەگەر بەکارهێنەرێک {} پەیام لەسەریەک و بەخێرایی بنێرێت من بانیدەکەم." .format(limit))
def __chat_settings__(chat_id, user_id): limit = sql.get_flood_limit(chat_id) soft_flood = sql.get_flood_strength(chat_id) if limit == 0: return "*Not* currently enforcing flood control." if soft_flood: return "Anti-flood is set to `{}` messages and *KICK* if exceeded.".format( limit) return "Anti-flood is set to `{}` messages and *BAN* if exceeded.".format( limit)
def flood(bot: Bot, update: Update): chat = update.effective_chat # type: Optional[Chat] limit = sql.get_flood_limit(chat.id) if limit == 0: update.effective_message.reply_text("Şuanda AntiFlood Devre Dışı!") else: update.effective_message.reply_text( " {} I'll leave the bun to the person who sends the message more at the same time." .format(limit))
def flood(bot: Bot, update: Update): chat = update.effective_chat # type: Optional[Chat] limit = sql.get_flood_limit(chat.id) if limit == 0: update.effective_message.reply_text( "Mən hazırda Flood a nəzarət etmirəm!") else: update.effective_message.reply_text( " {} tez-tez çoxlu mesaj göndərənləri ban edəcəm.".format(limit))
def flood(bot: Bot, update: Update): chat = update.effective_chat # type: Optional[Chat] limit = sql.get_flood_limit(chat.id) if limit == 0: update.effective_message.reply_text( "මම දැන් පණිවිඩ පාලනය කරන්නේ නැහැ!") else: update.effective_message.reply_text( " {} මම එකවරම පණිවිඩය යවන පුද්ගලයාට bun තබමි.".format(limit))
def flood(bot: Bot, update: Update): chat = update.effective_chat # type: Optional[Chat] limit = sql.get_flood_limit(chat.id) if limit == 0: update.effective_message.reply_text("NO message control right now!") else: update.effective_message.reply_text( " {} Flood karke to dekhe bande ko ek laat marke samjadunga!😁.". format(limit))
def check_flood(bot: Bot, update: Update) -> str: user = update.effective_user # type: Optional[User] chat = update.effective_chat # type: Optional[Chat] msg = update.effective_message # type: Optional[Message] limit = sql.get_flood_limit(chat.id) if not user: # ignore channels return "" # ignore admins if is_user_admin(chat, user.id): sql.update_flood(chat.id, None) return "" should_ban = sql.update_flood(chat.id, user.id) if not should_ban: return "" soft_flood = sql.get_flood_strength(chat.id) if soft_flood: # kick chat.unban_member(user.id) reply = "Wonderful, I don't like your flooding. Get out!" \ " {} has been kicked!".format(mention_html(user.id, user.first_name)) else: # ban chat.kick_member(user.id) reply = "Frankly, I like to leave the flooding to natural disasters." \ " {} has been banned!".format(mention_html(user.id, user.first_name)) try: keyboard = [] msg.reply_text(reply, reply_markup=keyboard, parse_mode=ParseMode.HTML) msg.delete() log = "<b>{}:</b>" \ "\n#FLOOD_CONTROL" \ "\n<b>• User:</b> {}" \ "\n<b>• ID:</b> <code>{}</code>".format(html.escape(chat.title), mention_html(user.id, user.first_name), user.id) if soft_flood: log +="\n<b>• Action:</b> kicked" else: log +="\n<b>• Action:</b> banned" log +="\n<b>• Reason:</b> Exceeded flood limit of {} consecutive messages.".format(limit) return log except BadRequest: msg.reply_text("I can't kick people here, give me permissions first! Until then, I'll disable anti-flood.") sql.set_flood(chat.id, 0) return "<b>{}:</b>" \ "\n#INFO" \ "\nDon't have kick permissions, so automatically disabled anti-flood.".format(chat.title)
def flood(bot: Bot, update: Update): chat = update.effective_chat # type: Optional[Chat] limit = sql.get_flood_limit(chat.id) if limit == 0: update.effective_message.reply_text( "Sto monitorando la chat alla ricerca di flooding!") else: update.effective_message.reply_text( "Bannerò gli utenti che invieranno più di {} messaggi consecutivi." .format(limit))
def flood(bot: Bot, update: Update): chat = update.effective_chat # type: Optional[Chat] limit = sql.get_flood_limit(chat.id) if limit == 0: update.effective_message.reply_text( "Mən hazırda mesaj nəzarəti etmirəm!") else: update.effective_message.reply_text( " {} Bunu eyni zamanda daha çox mesaj göndərən şəxsə buraxacağam.". format(limit))
def __chat_settings__(chat_id, user_id): limit = sql.get_flood_limit(chat_id) if limit == 0: return "*Not* currently enforcing flood control." else: return "Antiflood is set to `{}` messages.".format(limit)
def flood(update: Update, context): chat = update.effective_chat # type: Optional[Chat] limit = sql.get_flood_limit(chat.id) if limit == 0: update.effective_message.reply_text( "현재 도배 방지 기능을 사용하지 않고 있어요. 먼저 /setflood 명령어를 이용하여 도배방지 기능을 활성화해 주세요." ) else: update.effective_message.reply_text( "도배 방지가 {} 개로 설정되어 있어요!".format(limit))
def flood(bot: Bot, update: Update): chat = update.effective_chat # type: Optional[Chat] limit = sql.get_flood_limit(chat.id) if limit == 0: update.effective_message.reply_text( "Ich führe aktuell keine Floodkontrolle durch!") else: update.effective_message.reply_text( "Ich banne nutzer, wenn sie {} Nachrichten am Stück senden.". format(limit))
def flood(bot: Bot, update: Update): chat = update.effective_chat # type: Optional[Chat] limit = sql.get_flood_limit(chat.id) if limit == 0: update.effective_message.reply_text( "I am not doing message control right now!") else: update.effective_message.reply_text( " {} سأترك الكعكة للشخص الذي يرسل الرسالة أكثر في نفس الوقت.". format(limit))
def flood(bot: Bot, update: Update): chat = update.effective_chat # type: Optional[Chat] limit = sql.get_flood_limit(chat.id) if limit == 0: update.effective_message.reply_text( "Msg control isnt working right now!") else: update.effective_message.reply_text( " {} Users jo limite se jyada msg ek bar me bhejenge unhe pehli fursat me niklaya jaega" .format(limit))
def flood(bot: Bot, update: Update): chat = update.effective_chat # type: Optional[Chat] limit = sql.get_flood_limit(chat.id) if limit == 0: update.effective_message.reply_text( "मैं अभी मैसेज कंट्रोल नहीं कर रहा हूं!") else: update.effective_message.reply_text( " {} मैं एक ही समय में संदेश भेजने वाले व्यक्ति को छोड़ दूंगा". format(limit))
def flood(bot: Bot, update: Update): chat = update.effective_chat # type: Optional[Chat] limit = sql.get_flood_limit(chat.id) if limit == 0: update.effective_message.reply_text( "ഞാൻ ഇപ്പോൾ മെസ്സേജ് നിയന്ത്രണം നടത്തുന്നില്ല !") else: update.effective_message.reply_text( " {} മഒരേ സമയം കൂടുതൽ മെസ്സേജ് അയകുന്നവരെ ജോസ് പുറത്താകും കേട്ടോ....!." .format(limit))