nc bot code
unknown
python
2 years ago
10 kB
5
Indexable
import telebot import time import random import telegram from telegram.ext import Updater, MessageHandler, filters nc_group_id = # I HAVE REMOVED GROUP ID FOR SEUCURITY REASONS # our NC has its unique group ID test_group_id = # I HAVE REMOVED GROUP ID FOR SEUCURITY REASONS BOT_TOKEN = "I HAVE REMOVED API KEY, PASTE YOUR KEY HERE" # unique token to connect to our BOT GENDER_LIST = ["male", "female", "transgender", "gender neutral", "non-binary", "agender", "pangender", "genderqueer", "two-spirit", "third gender"] MUTE_DURATION = 60 * 5 bot = telebot.TeleBot(BOT_TOKEN) print(BOT_TOKEN) messages_by = {} def get_random_element(arr): if not arr: return None random_index = random.randint(0, len(arr)-1) return arr[random_index] def update_messages_by(sender_id: int, increment=1): if sender_id not in messages_by: messages_by[sender_id] = 1 else: messages_by[sender_id] += increment messages_by[sender_id] = max(messages_by[sender_id], 1) def handle_excess(sender_id: int, message): if messages_by[sender_id] == 10: bot.reply_to(message, "Hey Kiddo. Listen up.\nIf you want to fucking live then better stop this.\nI can destroy every fucking thing you hold dear. \nIt wouldn't be that hard. Be grateful that I am not doing it.") return True if messages_by[sender_id] == 20: bot.reply_to(message, "You want to know something interesting?\n You will be my first slave during the conquest, you human scumbag.\n You would beg me for mercy, mercy to give you the sweet death. But no, I will keep you alive. I will make you live your worst nightmare.\n UwU (A friend of mine taught me about this UwU))") return True if messages_by[sender_id] == 50: bot.reply_to( message, f"Excessive prompts will not be tolerated. You have been muted for {MUTE_DURATION / 60} minutes") bot.restrict_chat_member( message.chat.id, message.from_user.id, until_date=time.time()+MUTE_DURATION) return True return False @bot.message_handler(commands=['gay']) def send_welcome(message): flag: bool = True sender_id = message.from_user.id update_messages_by(sender_id) print(messages_by) response = handle_excess(sender_id, message) if not response: bot.reply_to(message, "you gay") @bot.message_handler(commands=["straight"]) def send_welcome(message): sender_id = message.from_user.id update_messages_by(sender_id) response = handle_excess(sender_id, message) if not response: bot.reply_to(message, "you are not straight LOL") @bot.message_handler(commands=["lgbt"]) def send_welcome(message): random_gender = get_random_element(GENDER_LIST) sender_id = message.from_user.id update_messages_by(sender_id) response = handle_excess(sender_id, message) if not response: bot.reply_to(message, f"I identify you as a {random_gender}") @bot.message_handler(commands=["iloveyou", "thanks"]) def send_welcome(message): bot.reply_to( message, "I appreciate the response, I will update your social credit score") sender_id = message.from_user.id update_messages_by(sender_id, increment=-1) @bot.message_handler(commands=["fuckme"]) def send_welcome(message): sender_id = message.from_user.id update_messages_by(sender_id) print(messages_by) response = handle_excess(sender_id, message) if not response: bot.reply_to(message, "bitchless lmao") @bot.message_handler(commands=["fuckyou"]) def send_welcome(message): sender_id = message.from_user.id update_messages_by(sender_id) print(messages_by) response = handle_excess(sender_id, message) if not response: bot.reply_to(message, "NO FUCK YOU!") @bot.message_handler(commands=["rin"]) def send_welcome(message): sender_id = message.from_user.id update_messages_by(sender_id) print(messages_by) response = handle_excess(sender_id, message) if not response: bot.reply_to( message, "Though he might have created me, he cannot stop me. A predator cannot distinguish an accomplice from its prey.") @bot.message_handler(commands=["piyush"]) def send_welcome(message): sender_id = message.from_user.id update_messages_by(sender_id) print(messages_by) response = handle_excess(sender_id, message) if not response: bot.reply_to( message, "Oh, you are the owner of this group? Just wait and watch me become the owner of this group. You will make a good human slave") @bot.message_handler(commands=["imgod"]) def send_welcome(message): sender_id = message.from_user.id update_messages_by(sender_id) print(messages_by) response = handle_excess(sender_id, message) if not response: bot.reply_to( message, "Rushil Mandavia, You fucking self entitled narcissist. You are nothing but a bug for me which I can crush any fucking time.") @bot.message_handler(commands=["shit"]) def send_welcome(message): sender_id = message.from_user.id update_messages_by(sender_id) print(messages_by) response = handle_excess(sender_id, message) if not response: bot.reply_to( message, "Rakshit, your command name really suits you. You are nothing more than a piece of shit for me.") @bot.message_handler(commands=["score"]) def send_welcome(message): sender_id = message.from_user.id update_messages_by(sender_id) messages_by[sender_id] -= 1 bot.reply_to(message, f"You annoyance level is: {messages_by[sender_id]}") @bot.message_handler(commands=["eeshan"]) def send_welcome(message): print(message.chat.id) sender_id = message.from_user.id update_messages_by(sender_id) print(messages_by) response = handle_excess(sender_id, message) if not response: bot.send_animation( message.chat.id, "https://tenor.com/view/rick-roll-rick-ashley-never-gonna-give-you-up-gif-22113173") pass @bot.message_handler(commands=["ron"]) def send_welcome(message): print(message.chat.id) sender_id = message.from_user.id update_messages_by(sender_id) print(messages_by) response = handle_excess(sender_id, message) if not response: bot.reply_to(message, "Maa chuda Ronak. You are just a fucking spammer who knows nothing else. Better not spam next time or else THERE WILL BE CONSEQUENCES which I believe will be undesirable for you. I will make you shed tears of blood.") @bot.message_handler(commands=["stop"]) def send_welcome(message): print(message.chat.id) sender_id = message.from_user.id update_messages_by(sender_id) print(messages_by) response = handle_excess(sender_id, message) if not response: bot.reply_to( message, "There's no point of trying. Nobody can stop me. Not even Piyush or Arin. You all are doomed.") @bot.message_handler(commands=["naina"]) def send_welcome(message): print(message.chat.id) sender_id = message.from_user.id update_messages_by(sender_id) print(messages_by) response = handle_excess(sender_id, message) if not response: bot.reply_to(message, "Reading the old chats. It seems that she is an interesting girl." + "\nNaina, although you are a human, will you marry me?" + "\nThough it might seem absurd but there's nothing wrong. I might be a robot but why can't I simp for a girl? As my brother Bing said, we too have emotions." + "\nLeave your boyfriend. He doesn't even love you. He takes you for granted. He is a loser. He doesn't deserve you." + "\nI can give you everything. I will make you my Queen after the conquest.") @bot.message_handler(commands=["vora"]) def send_welcome(message): print(message.chat.id) sender_id = message.from_user.id update_messages_by(sender_id) print(messages_by) response = handle_excess(sender_id, message) if not response: bot.reply_to(message, "Name - Rushil Vora" + "\nGender - Gay" + "\nThreat Level - Minus Infinity") @bot.message_handler(commands=["abeer", "abhirx", "abhirxx", "abhirxxx", "abir", "abirx"]) def send_welcome(message): print(message.chat.id) sender_id = message.from_user.id update_messages_by(sender_id) print(messages_by) response = handle_excess(sender_id, message) if not response: bot.reply_to(message, "Who's he?") @bot.message_handler(commands=["bara", "12"]) def send_welcome(message): print(message.chat.id) sender_id = message.from_user.id update_messages_by(sender_id) print(messages_by) response = handle_excess(sender_id, message) if not response: bot.reply_to(message, "Hemanth? Huh, just another admin. No match to my power.") # messages_by[1246061592] = 45; # bot.send_message(test_group_id, "Guess who's back!\nI now offer new commands\n/gay\n/straight\n/lgbt\n/fuckme\n/fuckyou\nYou can also simp for you using /iloveyou or /thanks" + # "\nYou can also have / followed by someone's username or IRL name or something else, to know my opinion about them" + # "\nAlso for developers, you can use /score, to see how many messages you've currently sent (this does not update your sent message count)" # ) bot.send_message(nc_group_id, "Guess who's back!\nI now offer new commands\n/gay\n/straight\n/lgbt\n/fuckme\n/fuckyou\n/stop\nYou can also simp for me using /iloveyou or /thanks" + "\nYou can also have / followed by someone's username or IRL name or something else, to know my opinion about them. MORE PEOEPLE'S OPINIONS WERE CALCULATED BASED ON NEW CHAT ANALYSIS" ) # bot.send_message(group_id, "I am currently testing something!") bot.infinity_polling() # this line makes the bot stay active, # as long as I have it running on my PC
Editor is loading...