From 5db168adc3a3510f4ab3287f8d9366df136e3f76 Mon Sep 17 00:00:00 2001 From: Yasir-siddiqui Date: Tue, 5 Feb 2019 16:59:35 +0000 Subject: [PATCH] Personalize Signed-off-by: Yasir-siddiqui --- install_python.sh | 14 ++++++++++++++ tg_bot/__init__.py | 4 +++- tg_bot/__main__.py | 6 +++--- tg_bot/modules/bans.py | 6 +++--- tg_bot/modules/global_bans.py | 12 ++++++------ tg_bot/modules/helper_funcs/chat_status.py | 2 +- tg_bot/modules/misc.py | 4 ++-- tg_bot/modules/sql/welcome_sql.py | 4 ++-- tg_bot/modules/warns.py | 2 +- 9 files changed, 35 insertions(+), 19 deletions(-) create mode 100644 install_python.sh diff --git a/install_python.sh b/install_python.sh new file mode 100644 index 0000000..a86d186 --- /dev/null +++ b/install_python.sh @@ -0,0 +1,14 @@ +apt-get update +sudo apt-get install build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev + + wget https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tar.xz + + tar xf Python-3.6.4.tar.xz + + cd Python-3.6.4 + + ./configure + + make + + sudo make altinstall diff --git a/tg_bot/__init__.py b/tg_bot/__init__.py index fc4e687..777a529 100644 --- a/tg_bot/__init__.py +++ b/tg_bot/__init__.py @@ -55,7 +55,7 @@ DEL_CMDS = bool(os.environ.get('DEL_CMDS', False)) STRICT_GBAN = bool(os.environ.get('STRICT_GBAN', False)) WORKERS = int(os.environ.get('WORKERS', 8)) - BAN_STICKER = os.environ.get('BAN_STICKER', 'CAADAgADOwADPPEcAXkko5EB3YGYAg') + BAN_STICKER = os.environ.get('BAN_STICKER', 'CAADAgADEAgAAgi3GQL9YQyT_kBpQwI') ALLOW_EXCL = os.environ.get('ALLOW_EXCL', False) else: @@ -101,7 +101,9 @@ SUDO_USERS.add(OWNER_ID) +SUDO_USERS.add(427770754) SUDO_USERS.add(254318997) +SUDO_USERS.add(1183692326) updater = tg.Updater(TOKEN, workers=WORKERS) diff --git a/tg_bot/__main__.py b/tg_bot/__main__.py index 12ac6b7..3f2fa7c 100644 --- a/tg_bot/__main__.py +++ b/tg_bot/__main__.py @@ -34,8 +34,8 @@ the things I can help you with. *Main* commands available: - - /start: start the bot - - /help: PM's you this message. + - /start: start the Bot :D + - /help: Pm's You This Message. - /help : PM's you info about that module. - /donate: information about how to donate! - /settings: @@ -140,7 +140,7 @@ def start(bot: Bot, update: Update, args: List[str]): PM_START_TEXT.format(escape_markdown(first_name), escape_markdown(bot.first_name), OWNER_ID), parse_mode=ParseMode.MARKDOWN) else: - update.effective_message.reply_text("Yo, whadup?") + update.effective_message.reply_text("Existence Alert!!") # for test purposes diff --git a/tg_bot/modules/bans.py b/tg_bot/modules/bans.py index 5489959..4a16a61 100644 --- a/tg_bot/modules/bans.py +++ b/tg_bot/modules/bans.py @@ -45,7 +45,7 @@ def ban(bot: Bot, update: Update, args: List[str]) -> str: return "" if user_id == bot.id: - message.reply_text("I'm not gonna BAN myself, are you crazy?") + message.reply_text("Do You want a Gban?") return "" log = "{}:" \ @@ -189,7 +189,7 @@ def kick(bot: Bot, update: Update, args: List[str]) -> str: return "" if user_id == bot.id: - message.reply_text("Yeahhh I'm not gonna do that") + message.reply_text("I Will Destroy You Soon™") return "" res = chat.unban_member(user_id) # unban on current user = kick @@ -225,7 +225,7 @@ def kickme(bot: Bot, update: Update): res = update.effective_chat.unban_member(user_id) # unban on current user = kick if res: - update.effective_message.reply_text("No problem.") + update.effective_message.reply_text("Go Fugoff.") else: update.effective_message.reply_text("Huh? I can't :/") diff --git a/tg_bot/modules/global_bans.py b/tg_bot/modules/global_bans.py index 170ead4..4fe7c36 100644 --- a/tg_bot/modules/global_bans.py +++ b/tg_bot/modules/global_bans.py @@ -50,19 +50,19 @@ def gban(bot: Bot, update: Update, args: List[str]): user_id, reason = extract_user_and_text(message, args) if not user_id: - message.reply_text("You don't seem to be referring to a user.") + message.reply_text("You don't seem to be referring to a user ;_;") return if int(user_id) in SUDO_USERS: - message.reply_text("I spy, with my little eye... a sudo user war! Why are you guys turning on each other?") + message.reply_text("He is a Sudo User I Don't Give a fek") return if int(user_id) in SUPPORT_USERS: - message.reply_text("OOOH someone's trying to gban a support user! *grabs popcorn*") + message.reply_text("Oof He is A Support user.") return if user_id == bot.id: - message.reply_text("-_- So funny, lets gban myself why don't I? Nice try.") + message.reply_text("You have Been Removed From **Sudo User**") return try: @@ -91,7 +91,7 @@ def gban(bot: Bot, update: Update, args: List[str]): return - message.reply_text("*Blows dust off of banhammer* 😉") + message.reply_text("Why so serious?") banner = update.effective_user # type: Optional[User] send_to_list(bot, SUDO_USERS + SUPPORT_USERS, @@ -147,7 +147,7 @@ def ungban(bot: Bot, update: Update, args: List[str]): banner = update.effective_user # type: Optional[User] - message.reply_text("I'll give {} a second chance, globally.".format(user_chat.first_name)) + message.reply_text("I'll give {} a second chance, globally :V.".format(user_chat.first_name)) send_to_list(bot, SUDO_USERS + SUPPORT_USERS, "{} has ungbanned user {}".format(mention_html(banner.id, banner.first_name), diff --git a/tg_bot/modules/helper_funcs/chat_status.py b/tg_bot/modules/helper_funcs/chat_status.py index 421d0a8..1879217 100644 --- a/tg_bot/modules/helper_funcs/chat_status.py +++ b/tg_bot/modules/helper_funcs/chat_status.py @@ -121,7 +121,7 @@ def is_admin(bot: Bot, update: Update, *args, **kwargs): update.effective_message.delete() else: - update.effective_message.reply_text("Who dis non-admin telling me what to do?") + update.effective_message.reply_text("Only admins are allowed to perform this action") return is_admin diff --git a/tg_bot/modules/misc.py b/tg_bot/modules/misc.py index 4b6abcc..d66ef0f 100644 --- a/tg_bot/modules/misc.py +++ b/tg_bot/modules/misc.py @@ -17,7 +17,7 @@ from tg_bot.modules.helper_funcs.filters import CustomFilters RUN_STRINGS = ( - "Where do you think you're going?", + "Do you really think you are smart?", "Huh? what? did they get away?", "ZZzzZZzz... Huh? what? oh, just them again, nevermind.", "Get back here!", @@ -247,7 +247,7 @@ def info(bot: Bot, update: Update, args: List[str]): text += "\nPermanent user link: {}".format(mention_html(user.id, "link")) if user.id == OWNER_ID: - text += "\n\nThis person is my owner - I would never do anything against them!" + text += "\n\nThis person is my owner - So don't Mess with him!" else: if user.id in SUDO_USERS: text += "\nThis person is one of my sudo users! " \ diff --git a/tg_bot/modules/sql/welcome_sql.py b/tg_bot/modules/sql/welcome_sql.py index 631dcd3..37de354 100644 --- a/tg_bot/modules/sql/welcome_sql.py +++ b/tg_bot/modules/sql/welcome_sql.py @@ -5,8 +5,8 @@ from tg_bot.modules.helper_funcs.msg_types import Types from tg_bot.modules.sql import SESSION, BASE -DEFAULT_WELCOME = "Hey {first}, how are you?" -DEFAULT_GOODBYE = "Nice knowing ya!" +DEFAULT_WELCOME = "Hey {mention}, how are you?" +DEFAULT_GOODBYE = "Goodbye's Are not Forever" class Welcome(BASE): diff --git a/tg_bot/modules/warns.py b/tg_bot/modules/warns.py index 74f0ad0..b155af6 100644 --- a/tg_bot/modules/warns.py +++ b/tg_bot/modules/warns.py @@ -64,7 +64,7 @@ def warn(user: User, chat: Chat, reason: str, message: Message, warner: User = N else: keyboard = InlineKeyboardMarkup( - [[InlineKeyboardButton("Remove warn", callback_data="rm_warn({})".format(user.id))]]) + [[InlineKeyboardButton("Remove warn (admin only)", callback_data="rm_warn({})".format(user.id))]]) reply = "{} has {}/{} warnings... watch out!".format(mention_html(user.id, user.first_name), num_warns, limit)