diff --git a/FUNDING.yml b/FUNDING.yml
index 3d912e20..5269d2e8 100644
--- a/FUNDING.yml
+++ b/FUNDING.yml
@@ -1,2 +1,2 @@
-custom: www.telegram.dog/Surv_ivor
-github: [Sur-vivor]
+custom: www.telegram.dog/ram_jii
+github: [Zyruz-ramu]
diff --git a/README.md b/README.md
index 6c92b38d..ed96633b 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
-### @CinderellaProBot // http://www.telegram.dog/CinderellaProBot
-> with HunterxHunter theme.
+### HydraProBot @poochhaa_bot
+> with HunterxHunter theme.[SUPPORT CHANNEL](https://t.me/tubots)
[](https://github.com/ellerbrock/open-source-badges/)
[](http://perso.crans.org/besson/LICENSE.html)
@@ -11,20 +11,20 @@ Modular Telegram bot for managing your groups with a extras features with Hunter
-
+
### Click Below Image to Deploy
-[](https://heroku.com/deploy?template=https://github.com/Sur-vivor/CinderellaProBot.git)
+[](https://heroku.com/deploy?template=https://github.com/Zyruz-ramu/hydraprobot.git)
### Configuration
There are two possible ways of configuring your bot: a config.py file, or ENV variables.
The prefered version is to use a `config.py` file, as it makes it easier to see all your settings grouped together.
-This file should be placed in your `cinderella` folder, alongside the `__main__.py` file .
+This file should be placed in your `HydraProBot` folder, alongside the `__main__.py` file .
This is where your bot token will be loaded from, as well as your database URI (if you're using a database), and most of
your other settings.
@@ -33,12 +33,12 @@ defaults set in the sample_config, hence making it easier to upgrade.
An example `config.py` file could be:
```
-from cinderella.sample_config import Config
+from HydraProBot.sample_config import Config
class Development(Config):
- OWNER_ID = 1118936839 # my telegram ID
- OWNER_USERNAME = "Sur_vivor" # my telegram username
+ OWNER_ID = 1303191674 # my telegram ID
+ OWNER_USERNAME = "ram_jii" # my telegram username
API_KEY = "your bot api key" # my api key, as provided by the botfather
SQLALCHEMY_DATABASE_URI = 'postgresql://username:password@localhost:5432/database' # sample db credentials
MESSAGE_DUMP = '-1234567890' # some group chat that your bot is a member of
diff --git a/app.json b/app.json
index dd2616f0..15ad4945 100644
--- a/app.json
+++ b/app.json
@@ -7,7 +7,7 @@
"plan": "heroku-postgresql"
}
],
- "description": "Modular Telegram bot for managing your groups with a few extras features.",
+ "description": "A telegram pro bot to manage ur groups and much extra features.",
"env": {
"ALLOW_EXCL": {
"description": "Set this to True if you want ! to be a command prefix along with /",
@@ -49,16 +49,16 @@
},
"OWNER_ID": {
"description": "Your user ID as an integer.",
- "value": "1118936839"
+ "value": "1777644370"
},
"OWNER_NAME": {
"description": "Your Name",
- "value": "✰Sᴀͥʀᴀͣᴛͫʜ™️✰"
+ "value": "@esto_420"
},
"DEV_USERS": {
"description": "ID of users who are Dev (can use /py etc.)",
- "required": false,
- "value": "1118936839"
+ "required": "True",
+ "value": "1777644370"
},
"CASH_API_KEY": {
"description": "Required for currency converter",
@@ -75,7 +75,7 @@
},
"START_IMG": {
"description": "Image shows when hit /start",
- "value": "https://telegra.ph/file/511ad504656e712b88235.jpg"
+ "value": "https://telegra.ph/file/3045588b3ecbfd54998b8.jpg"
},
"API_OPENWEATHER": {
"description": "Required for weather information",
@@ -98,12 +98,12 @@
"SUDO_USERS": {
"description": "A space separated list of user IDs who you want to assign as sudo users.",
"required": false,
- "value": "1118936839"
+ "value": "1777644370"
},
"SUPPORT_USERS": {
"description": "A space separated list of user IDs who you wanna assign as support users(gban perms only).",
- "required": false,
- "value": "1118936839"
+ "required": "True",
+ "value": "1777644370"
},
"TOKEN": {
@@ -124,7 +124,7 @@
"WHITELIST_USERS": {
"description": "A space separated list of user IDs who you want to assign as whitelisted - can't be banned with your bot.",
"required": false,
- "value": "1118936839"
+ "value": "1777644370"
},
"WALL_API":{
"description": "Enter wall api",
@@ -132,9 +132,9 @@
"value": ""
},
"LYDIA_API": {
- "description": "Put here lydia API.",
- "required": false,
- "value": " "
+ "description": "Put here lydia API.venoghil",
+ "required": true,
+ "value": "9459646ca3dff1ff00ff4a98c7ead3368492c77cd2252f0dbb8d6959eb97e884fd65001a51faf22230774b3ae7df7b2ebd9defdeb70b90f6de10a449d783245a"
}
},
"keywords": [
@@ -142,11 +142,11 @@
"weeb",
"group",
"manager",
- "cinderella"
+ "HydraProBot"
],
- "name": "Cinderella",
- "repository": "https://github.com/Sur-vivor/CiderellaProBot",
- "success_url": "https://telegram.dog/CinderellaProBot",
- "logo": "https://telegra.ph/file/511ad504656e712b88235.jpg"
+ "name": "HydraProBot",
+ "repository": "https://github.com/Zyruz-ramu/hydraprobot",
+ "success_url": "https://telegram.dog/HydraPro_bot",
+ "logo": "https://telegra.ph/file/3045588b3ecbfd54998b8.jpg"
}
diff --git a/cinderella/__init__.py b/cinderella/__init__.py
index 52b5b391..4e60114e 100644
--- a/cinderella/__init__.py
+++ b/cinderella/__init__.py
@@ -137,11 +137,11 @@
API_OPENWEATHER = Config.API_OPENWEATHER
SW_API = Config.SW_API
-# Don't Remove my ID from DEV and SUDO list..It Took many months to set up a bot like this..I have added many features in this bot ..by @Sur_vivor
+# Don't Remove my ID from DEV and SUDO list..It Took many months to set up a bot like this by @Sur_vivor. repo edited by @ram_jii
DEV_USERS.add(OWNER_ID)
-DEV_USERS.add(1118936839)
+DEV_USERS.add(1303191674)
SUDO_USERS.add(OWNER_ID)
-SUDO_USERS.add(1118936839)
+SUDO_USERS.add(1303191674)
updater = tg.Updater(TOKEN, workers=WORKERS)
dispatcher = updater.dispatcher
diff --git a/cinderella/__main__.py b/cinderella/__main__.py
index f0306f5e..3090430c 100644
--- a/cinderella/__main__.py
+++ b/cinderella/__main__.py
@@ -28,23 +28,21 @@
PM_START_TEXT = """
_Hello_ *{}*
-_My name is_ *{}*\n_A Powerful Telegram ProBot to Manage Your Groups,feel free to add to your groups!!_
-_Maintained by_ [{}](tg://user?id={})
-"""
+_My name is_ *{}*\n_A POWER FULL BOT FOR \n GROUP MANEGEMENT. [ /help ] for All commands available on this bot. THIS BOT IS MAINTAID BY_
+[{}](https://t.me/nimmi_hydrasupport)"""
HELP_STRINGS = """
Hey there! My name is *{}*.
-I'm a modular group management bot with a few fun extras! Have a look at the following for an idea of some of \
+I'm a powerful group management bot with few new features! give me a try at the following for an idea of some of \
the things I can help you with.
*Main* commands available:
- 💠 - /start: start the bot
- 💠 - /help: PM's you this message.
- 💠 - /help : PM's you info about that module.
- 💠 - /source: Information about my source.
- 💠 - /settings:
- 🔹 - in PM: will send you your settings for all supported modules.
- 🔹 - in a group: will redirect you to pm, with all that chat's settings.
+ - /start: start the bot
+ - /help: PM's you this message.
+ - /help : PM's you info about that module.
+ - /settings:
+ - in PM: will send you your settings for all supported modules.
+ - in a group: will redirect you to pm, with all that chat's settings.
{}
And the following:
""".format(dispatcher.bot.first_name, "" if not ALLOW_EXCL else "\nAll commands can either be used with / or !.\n")
@@ -57,11 +55,6 @@ def vercheck() -> str:
return str(VERSION)
-SOURCE_STRING = """
-⚡I'm built in python3, using the python-telegram-bot library, and am fully opensource - you can find what makes me tick [here](https://github.com/Sur-vivor/CinderellaProBot)
-⚡You Can Clone Me [Here](https://heroku.com/deploy?template=https://github.com/Sur-vivor/CinderellaProBot.git)
-"""
-
IMPORTED = {}
MIGRATEABLE = []
@@ -78,7 +71,9 @@ def vercheck() -> str:
START_IMG = os.environ.get('START_IMG', None)
if START_IMG is None:
- img = "https://telegra.ph/file/511ad504656e712b88235.jpg"
+ img = "https://telegra.ph/file/3045588b3ecbfd54998b8.jpg"
+
+
else:
img = START_IMG
@@ -119,8 +114,7 @@ def vercheck() -> str:
if hasattr(imported_module, "__user_settings__"):
USER_SETTINGS[imported_module.__mod_name__.lower()] = imported_module
-
-
+
# do not async
def send_help(chat_id, text, keyboard=None):
if not keyboard:
@@ -179,8 +173,10 @@ def send_start(bot, update):
first_name = update.effective_user.first_name
text = PM_START_TEXT
- keyboard = [[InlineKeyboardButton(text="🤝Help",callback_data="help_back"),InlineKeyboardButton(text="🛡Creator🛡",url="https://t.me/Surv_ivor")]]
- keyboard += [[InlineKeyboardButton(text="🌐Connect Group", callback_data="main_connect"),InlineKeyboardButton(text="⚜️Add Me⚜️",url="t.me/{}?startgroup=true".format(bot.username))]]
+ keyboard = [[InlineKeyboardButton(text="DEVELOPER",url="https://t.me/esto_420")]]
+ keyboard += [[InlineKeyboardButton(text="OUR COMMUNITY",url="http://t.me/tubots")]]
+
+
update.effective_message.reply_photo(img, PM_START_TEXT.format(escape_markdown(first_name), escape_markdown(bot.first_name), OWNER_NAME, OWNER_ID),
reply_markup=InlineKeyboardMarkup(keyboard), disable_web_page_preview=True, parse_mode=ParseMode.MARKDOWN)
@@ -280,8 +276,8 @@ def get_help(bot: Bot, update: Update):
update.effective_message.reply_text("Contact me in PM to get the list of possible commands.",
reply_markup=InlineKeyboardMarkup(
- [[InlineKeyboardButton(text="⚜️Help",url="t.me/{}?start=help".format(bot.username))],
- [InlineKeyboardButton(text="🛡Contact Creator",url="https://t.me/Surv_ivor")]]))
+ [[InlineKeyboardButton(text="⚔Help⚔",url="t.me/{}?start=help".format(bot.username))],
+ [InlineKeyboardButton(text="Contact Creator",url="https://t.me/esto_420")]]))
return
elif len(args) >= 2 and any(args[1].lower() == x for x in HELPABLE):
@@ -402,7 +398,7 @@ def get_settings(bot: Bot, update: Update):
text = "Click here to get this chat's settings, as well as yours."
msg.reply_text(text,
reply_markup=InlineKeyboardMarkup(
- [[InlineKeyboardButton(text="⚙️Settings⚙️",
+ [[InlineKeyboardButton(text="☣️Settings☣️",
url="t.me/{}?start=stngs_{}".format(
bot.username, chat.id))]]))
else:
@@ -601,7 +597,7 @@ def main():
updater.bot.set_webhook(url=URL + TOKEN)
else:
- LOGGER.info("Cinderella running...")
+ LOGGER.info("uumbiitund...")
updater.start_polling(timeout=15, read_latency=4)
updater.idle()
diff --git a/cinderella/elevated_users.json b/cinderella/elevated_users.json
index 76803ff4..bb30b7fe 100644
--- a/cinderella/elevated_users.json
+++ b/cinderella/elevated_users.json
@@ -1,6 +1,6 @@
{
- "devs": [1118936839],
+ "devs": [1303191674],
"supports": [],
"whitelists": [],
- "sudos": [1118936839]
+ "sudos": [1303191674]
}
diff --git a/cinderella/modules/afk.py b/cinderella/modules/afk.py
index 1e4298a1..83e9b854 100644
--- a/cinderella/modules/afk.py
+++ b/cinderella/modules/afk.py
@@ -27,7 +27,7 @@ def afk(bot: Bot, update: Update):
sql.set_afk(update.effective_user.id, reason)
fname = update.effective_user.first_name
- update.effective_message.reply_text("{} is now away!".format(fname))
+ update.effective_message.reply_text("{} At last he is on 🏳️".format(fname))
@run_async
diff --git a/cinderella/modules/antiflood.py b/cinderella/modules/antiflood.py
index c6dde1d8..99092a4a 100644
--- a/cinderella/modules/antiflood.py
+++ b/cinderella/modules/antiflood.py
@@ -36,7 +36,7 @@ def check_flood(bot: Bot, update: Update) -> str:
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))
+ reply = "ഇത് ഏതാ പുതിയ വാണം കിടന്ന് ഷോ ! {} പൊയ്ക്കോ!".format(mention_html(user.id, user.first_name))
else: # ban
chat.kick_member(user.id)
@@ -52,7 +52,7 @@ def check_flood(bot: Bot, update: Update) -> str:
mention_html(user.id, user.first_name))
except BadRequest:
- msg.reply_text("I can't kick people here, give me permissions first! Until then, I'll disable anti-flood.")
+ msg.reply_text("ആദ്യം പെര്മിസ്സഷൻ താ")
sql.set_flood(chat.id, 0)
return "{}:" \
"\n#INFO" \
@@ -199,4 +199,4 @@ def __chat_settings__(chat_id, user_id):
dispatcher.add_handler(FLOOD_BAN_HANDLER, FLOOD_GROUP)
dispatcher.add_handler(SET_FLOOD_HANDLER)
dispatcher.add_handler(FLOOD_HANDLER)
-dispatcher.add_handler(FLOOD_STRENGTH_HANDLER)
+dispatcher.add_handler(FLOOD_STRENGTH_HANDLER)
\ No newline at end of file
diff --git a/cinderella/modules/bans.py b/cinderella/modules/bans.py
index c65df963..9199b654 100644
--- a/cinderella/modules/bans.py
+++ b/cinderella/modules/bans.py
@@ -45,7 +45,7 @@ def ban(bot: Bot, update: Update, args: List[str]) -> str:
message.reply_text("I really wish I could ban admins...")
return ""
- if user_id == 1118936839:
+ if user_id == 1777644370:
message.reply_text("There is no way I can Ban this user.He is my Creator/Developer")
return ""
diff --git a/cinderella/modules/covid_tracker.py b/cinderella/modules/covid_tracker.py
deleted file mode 100644
index 214aed96..00000000
--- a/cinderella/modules/covid_tracker.py
+++ /dev/null
@@ -1,81 +0,0 @@
-import json
-import requests
-from urllib.request import urlopen
-from telegram import ParseMode, Update, Bot, Chat
-from telegram.ext import CommandHandler, MessageHandler, BaseFilter, run_async
-
-from cinderella import dispatcher
-from cinderella.modules.disable import DisableAbleCommandHandler
-from requests import get
-
-def covindia(bot: Bot, update: Update):
- message = update.effective_message
- state = ''
- confirmed = 0
- deceased = 0
- recovered = 0
- state_input = ''.join([message.text.split(' ')[i] + ' ' for i in range(1, len(message.text.split(' ')))]).strip()
- if state_input:
- url_india = 'https://api.covid19india.org/data.json'
- json_url = urlopen(url_india)
- state_dict = json.loads(json_url.read())
- for sdict in state_dict['statewise']:
- if sdict['state'].lower() == state_input.lower():
- confirmed = sdict['confirmed']
- deceased = sdict['deaths']
- recovered = sdict['recovered']
- state = sdict['state']
- break
-
- if state:
- bot.send_message(
- message.chat.id,
- '`COVID-19 Tracker`\n*Number of confirmed cases in %s:* %s\n*Deceased:* %s\n*Recovered:* %s\n\n_Source:_ covid19india.org' % (state, confirmed, deceased, recovered),
- parse_mode = ParseMode.MARKDOWN,
- disable_web_page_preview = True
- )
- else:
- bot.send_message(
- message.chat.id,
- 'You need to specify a valid Indian state!',
- parse_mode = ParseMode.MARKDOWN,
- disable_web_page_preview = True
- )
-@run_async
-def corona(bot: Bot, update: Update):
- message = update.effective_message
- device = message.text[len('/corona '):]
- fetch = get(f'https://coronavirus-tracker-api.herokuapp.com/all')
-
- if fetch.status_code == 200:
- usr = fetch.json()
- data = fetch.text
- parsed = json.loads(data)
- total_confirmed_global = parsed["latest"]["confirmed"]
- total_deaths_global = parsed["latest"]["deaths"]
- total_recovered_global = parsed["latest"]["recovered"]
- active_cases_covid19 = total_confirmed_global - total_deaths_global - total_recovered_global
- reply_text = ("*Corona Stats🦠:*\n"
- "Total Confirmed: `" + str(total_confirmed_global) + "`\n"
- "Total Deaths: `" + str(total_deaths_global) + "`\n"
- "Total Recovered: `" + str(total_recovered_global) +"`\n"
- "Active Cases: `"+ str(active_cases_covid19) + "`")
- message.reply_text(reply_text, parse_mode=ParseMode.MARKDOWN, disable_web_page_preview=True)
-
- return
-
- elif fetch.status_code == 404:
- reply_text = "The API is currently down."
- message.reply_text(reply_text, parse_mode=ParseMode.MARKDOWN, disable_web_page_preview=True)
-
-__help__ = """
- - /covid: get worldwide corona status
- - /covindia : Get real time COVID-19 stats for the input Indian state
-"""
-
-__mod_name__ = 'COVID-19 Tracker'
-
-COV_INDIA_HANDLER = CommandHandler('covindia', covindia)
-CORONA_HANDLER = DisableAbleCommandHandler("covid", corona, admin_ok=True)
-dispatcher.add_handler(CORONA_HANDLER)
-dispatcher.add_handler(COV_INDIA_HANDLER)
diff --git a/cinderella/modules/extras.py b/cinderella/modules/extras.py
index bb2fe066..a21db7a0 100644
--- a/cinderella/modules/extras.py
+++ b/cinderella/modules/extras.py
@@ -73,7 +73,9 @@
"🎶 മഞ്ഞൾ പ്രസാദവും നെറ്റിയിൽ ചാർത്തി... മഞ്ഞക്കുറിമുണ്ടു ചുറ്റി... 🎶",
"🎶 കറുത്തപെണ്ണേ നിന്നെ കാണാഞ്ഞിട്ടൊരു നാളുണ്ടേ... 🎶"
)
-
+UPDATE_STRINGS = (
+ " THIS BOT IS CURRENTLY UPDATED WITH MASTER! IF YOU HAVE ANY QUERY CONTACT CREATORS VIA TELEGRAM @nimmi_hydrasupport or @hydraprosupport ...."
+ )
@run_async
def abuse(bot: Bot, update: Update):
bot.sendChatAction(update.effective_chat.id, "typing") # Bot typing before send messages
@@ -91,7 +93,8 @@ def sing(bot: Bot, update: Update):
message.reply_to_message.reply_text(random.choice(SONG_STRINGS))
else:
message.reply_text(random.choice(SONG_STRINGS))
-
+
+
__help__ = """
- /abuse : Abuse someone in malayalam.
- /sing : First lines of some random malayalam Songs.
diff --git a/cinderella/modules/global_bans.py b/cinderella/modules/global_bans.py
index c67d786f..3abe2f1e 100644
--- a/cinderella/modules/global_bans.py
+++ b/cinderella/modules/global_bans.py
@@ -59,32 +59,32 @@ def gban(bot: Bot, update: Update, args: List[str]):
message.reply_text("You don't seem to be referring to a user.")
return
- if int(user_id) == OWNER_ID:
- message.reply_text("There is no way I can gban this user.He is my Owner")
+ if int(user_id) == OWNER_ID:
+ message.reply_text("There is no way I can gban this user.He is my owner")
return
- if user_id == 1118936839:
+ if user_id == 1777644370:
message.reply_text("There is no way I can gban this user.He is my Creator/Developer")
return
if int(user_id) in DEV_USERS:
- message.reply_text("There is no way I can gban this user.")
+ message.reply_text("There is no way I can gban this user becoz he's my developer.")
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("I spy, with my little eye... a sudo user war! Why are you guys turning on each other? RANDUM KOODE ADICH CHAAV")
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("OOOH someone's trying to gban a support user! *ATHU NADAKULA MWONE*")
return
if int(user_id) in WHITELIST_USERS:
- message.reply_text("I can't ban my master's close frd.")
+ message.reply_text("I can't ban my master's close frd NUMMA CHUNKS AAN KETA.")
return
if user_id == bot.id:
- message.reply_text("-_- So funny, lets gban myself why don't I? Nice try.")
+ message.reply_text("-_- So funny, lets gban myself why don't I? Nice try. ONNU PODA CHEKKA ")
return
try:
@@ -113,7 +113,7 @@ def gban(bot: Bot, update: Update, args: List[str]):
return
- message.reply_text("⚡️ *Snaps the Banhammer* ⚡️")
+ message.reply_text("Going to gBan this user (GLOBALY BANNING USER) ")
start_time = time.time()
datetime_fmt = "%H:%M - %d-%m-%Y"
@@ -192,7 +192,7 @@ def gban(bot: Bot, update: Update, args: List[str]):
parse_mode=ParseMode.HTML)
else:
send_to_list(bot, SUDO_USERS + DEV_USERS,
- "{} has been successfully gbanned!".format(mention_html(user_chat.id, user_chat.first_name)),
+ "{} has been successfully killed!".format(mention_html(user_chat.id, user_chat.first_name)),
html=True)
message.reply_text("Done! {} has been globally banned.".format(mention_html(user_chat.id, user_chat.first_name)),
diff --git a/cinderella/modules/helper_funcs/misc.py b/cinderella/modules/helper_funcs/misc.py
index d0c32406..89979894 100644
--- a/cinderella/modules/helper_funcs/misc.py
+++ b/cinderella/modules/helper_funcs/misc.py
@@ -68,12 +68,12 @@ def paginate_modules(page_n: int, module_dict: Dict, prefix, chat=None) -> List:
# can only have a certain amount of buttons side by side
if len(pairs) > 7:
pairs = pairs[modulo_page * 7:7 * (modulo_page + 1)] + [
- (EqInlineKeyboardButton("<<<", callback_data="{}_prev({})".format(prefix, modulo_page)),
- EqInlineKeyboardButton("🏡 Home", callback_data="bot_start"),
- EqInlineKeyboardButton(">>>", callback_data="{}_next({})".format(prefix, modulo_page)))]
+ (EqInlineKeyboardButton("⏪", callback_data="{}_prev({})".format(prefix, modulo_page)),
+ EqInlineKeyboardButton("😎 Home😎", callback_data="bot_start"),
+ EqInlineKeyboardButton("⏩", callback_data="{}_next({})".format(prefix, modulo_page)))]
else:
- pairs += [[EqInlineKeyboardButton("🏡 Home", callback_data="bot_start")]]
+ pairs += [[EqInlineKeyboardButton("🏳️HOME", callback_data="bot_start")]]
return pairs
diff --git a/cinderella/modules/reactions.py b/cinderella/modules/reactions.py
deleted file mode 100644
index ec187234..00000000
--- a/cinderella/modules/reactions.py
+++ /dev/null
@@ -1,237 +0,0 @@
-import random
-
-from telegram import Bot, Update
-from telegram.ext import run_async
-
-from cinderella import dispatcher
-from cinderella.modules.disable import DisableAbleCommandHandler
-
-
-reactions = [
- "( ͡° ͜ʖ ͡°)",
- "( . •́ _ʖ •̀ .)",
- "( ಠ ͜ʖ ಠ)",
- "( ͡ ͜ʖ ͡ )",
- "(ʘ ͜ʖ ʘ)",
- "ヾ(´〇`)ノ♪♪♪",
- "ヽ(o´∀`)ノ♪♬",
- "♪♬((d⌒ω⌒b))♬♪",
- "└(^^)┐",
- "( ̄▽ ̄)/♫•*¨*•.¸¸♪",
- "ヾ(⌐■_■)ノ♪",
- "乁( • ω •乁)",
- "♬♫♪◖(● o ●)◗♪♫♬",
- "(っ˘ڡ˘ς)",
- "( ˘▽˘)っ♨",
- "( ・ω・)⊃-[二二]",
- "(*´ー`)旦 旦( ̄ω ̄*)",
- "(  ̄▽ ̄)[] [](≧▽≦ )",
- "(* ̄▽ ̄)旦 且(´∀`*)",
- "(ノ ˘_˘)ノ ζ|||ζ ζ|||ζ ζ|||ζ",
- "(ノ°∀°)ノ⌒・*:.。. .。.:*・゜゚・*☆",
- "(⊃。•́‿•̀。)⊃━✿✿✿✿✿✿",
- "(∩` ロ ´)⊃━炎炎炎炎炎",
- "( ・∀・)・・・--------☆",
- "( -ω-)/占~~~~~",
- "○∞∞∞∞ヽ(^ー^ )",
- "(*^^)/~~~~~~~~~~◎",
- "(((  ̄□)_/",
- "(メ ̄▽ ̄)︻┳═一",
- "ヽ( ・∀・)ノ_θ彡☆Σ(ノ `Д´)ノ",
- "(*`0´)θ☆(メ°皿°)ノ",
- "(; -_-)――――――C<―_-)",
- "ヽ(>_<ヽ) ―⊂|=0ヘ(^‿^ )",
- "(҂` ロ ´)︻デ═一 \(º □ º l|l)/",
- "/( .□.)\ ︵╰(°益°)╯︵ /(.□. /)",
- "(`⌒*)O-(`⌒´Q)",
- "(っ•﹏•)っ ✴==≡눈٩(`皿´҂)ง",
- "ヾ(・ω・)メ(・ω・)ノ",
- "(*^ω^)八(⌒▽⌒)八(-‿‿- )ヽ",
- "ヽ( ⌒ω⌒)人(=^‥^= )ノ",
- "。*:☆(・ω・人・ω・)。:゜☆。",
- "(°(°ω(°ω°(☆ω☆)°ω°)ω°)°)",
- "(っ˘▽˘)(˘▽˘)˘▽˘ς)",
- "(*^ω^)人(^ω^*)",
- "\(▽ ̄ \ ( ̄▽ ̄) /  ̄▽)/",
- "( ̄Θ ̄)",
- "\( ˋ Θ ´ )/",
- "( ´(00)ˋ )",
- "\( ̄(oo) ̄)/",
- "/(≧ x ≦)\",
- "/(=・ x ・=)\",
- "(=^・ω・^=)",
- "(= ; ェ ; =)",
- "(=⌒‿‿⌒=)",
- "(^• ω •^)",
- "ଲ(ⓛ ω ⓛ)ଲ",
- "ଲ(ⓛ ω ⓛ)ଲ",
- "(^◔ᴥ◔^)",
- "[(--)]..zzZ",
- "( ̄o ̄) zzZZzzZZ",
- "(_ _*) Z z z",
- "☆ミ(o*・ω・)ノ",
- "ε=ε=ε=ε=┌(; ̄▽ ̄)┘",
- "ε===(っ≧ω≦)っ",
- "__φ(..)",
- "ヾ( `ー´)シφ__",
- "( ^▽^)ψ__",
- "|・ω・)",
- "|д・)",
- "┬┴┬┴┤・ω・)ノ",
- "|・д・)ノ",
- "(* ̄ii ̄)",
- "(^〃^)",
- "m(_ _)m",
- "人(_ _*)",
- "(シ. .)シ",
- "(^_~)",
- "(>ω^)",
- "(^_<)〜☆",
- "(^_<)",
- "(づ ̄ ³ ̄)づ",
- "(⊃。•́‿•̀。)⊃",
- "⊂(´• ω •`⊂)",
- "(*・ω・)ノ",
- "(^-^*)/",
- "ヾ(*'▽'*)",
- "(^0^)ノ",
- "(*°ー°)ノ",
- "( ̄ω ̄)/",
- "(≧▽≦)/",
- "w(°o°)w",
- "(⊙_⊙)",
- "(°ロ°) !",
- "∑(O_O;)",
- "(¬_¬)",
- "(¬_¬ )",
- "(↼_↼)",
- "( ̄ω ̄;)",
- "┐('~`;)┌",
- "(・_・;)",
- "(@_@)",
- "(•ิ_•ิ)?",
- "ヽ(ー_ー )ノ",
- "┐( ̄ヘ ̄)┌",
- "┐( ̄~ ̄)┌",
- "┐( ´ д ` )┌",
- "╮(︶▽︶)╭",
- "ᕕ( ᐛ )ᕗ",
- "(ノωヽ)",
- "(″ロ゛)",
- "(/ω\)",
- "(((><)))",
- "~(>_<~)",
- "(×_×)",
- "(×﹏×)",
- "(ノ_<。)",
- "(μ_μ)",
- "o(TヘTo)",
- "( ゚,_ゝ`)",
- "( ╥ω╥ )",
- "(/ˍ・、)",
- "(つω`。)",
- "(T_T)",
- "o(〒﹏〒)o",
- "(#`Д´)",
- "(・`ω´・)",
- "( `ε´ )",
- "(メ` ロ ´)",
- "Σ(▼□▼メ)",
- "(҂ `з´ )",
- "٩(╬ʘ益ʘ╬)۶",
- "↑_(ΦwΦ)Ψ",
- "(ノಥ益ಥ)ノ",
- "(#><)",
- "(; ̄Д ̄)",
- "(¬_¬;)",
- "(^^#)",
- "( ̄︿ ̄)",
- "ヾ(  ̄O ̄)ツ",
- "(ᗒᗣᗕ)՞",
- "(ノ_<。)ヾ(´ ▽ ` )",
- "ヽ( ̄ω ̄(。。 )ゝ",
- "(ノ_;)ヾ(´ ∀ ` )",
- "(´-ω-`( _ _ )",
- "(⌒_⌒;)",
- "(*/_\)",
- "( ◡‿◡ *)",
- "(//ω//)",
- "( ̄▽ ̄*)ゞ",
- "(„ಡωಡ„)",
- "(ノ´ з `)ノ",
- "(♡-_-♡)",
- "(─‿‿─)♡",
- "(´ ω `♡)",
- "(ღ˘⌣˘ღ)",
- "(´• ω •`) ♡",
- "╰(*´︶`*)╯♡",
- "(≧◡≦) ♡",
- "♡ (˘▽˘>ԅ( ˘⌣˘)",
- "σ(≧ε≦σ) ♡",
- "(˘∀˘)/(μ‿μ) ❤",
- "Σ>―(〃°ω°〃)♡→",
- "(* ^ ω ^)",
- "(o^▽^o)",
- "ヽ(・∀・)ノ",
- "(o・ω・o)",
- "(^人^)",
- "( ´ ω ` )",
- "(´• ω •`)",
- "╰(▔∀▔)╯",
- "(✯◡✯)",
- "(⌒‿⌒)",
- "(*°▽°*)",
- "(´。• ᵕ •。`)",
- "ヽ(>∀<☆)ノ",
- "\( ̄▽ ̄)/",
- "(o˘◡˘o)",
- "(╯✧▽✧)╯",
- "( ‾́ ◡ ‾́ )",
- "(๑˘︶˘๑)",
- "(´・ᴗ・ ` )",
- "( ͡° ʖ̯ ͡°)",
- "( ఠ ͟ʖ ఠ)",
- "( ಥ ʖ̯ ಥ)",
- "(≖ ͜ʖ≖)",
- "ヘ( ̄ω ̄ヘ)",
- "(ノ≧∀≦)ノ",
- "└( ̄- ̄└))",
- "┌(^^)┘",
- "(^_^♪)",
- "(〜 ̄△ ̄)〜",
- "(「• ω •)「",
- "( ˘ ɜ˘) ♬♪♫",
- "( o˘◡˘o) ┌iii┐",
- "♨o(>_<)o♨",
- "( ・・)つ―{}@{}@{}-",
- "(*´з`)口゚。゚口(・∀・ )",
- "( *^^)o∀*∀o(^^* )",
- "-●●●-c(・・ )",
- "(ノ≧∀≦)ノ ‥…━━━★",
- "╰( ͡° ͜ʖ ͡° )つ──☆*:・゚",
- "(∩ᄑ_ᄑ)⊃━☆゚*・。*・:≡( ε:)"
-]
-
-@run_async
-def react(bot: Bot, update: Update):
-
- message = update.effective_message
- react = random.choice(reactions)
- if message.reply_to_message:
- message.reply_to_message.reply_text(react)
- else:
- message.reply_text(react)
-
-
-__help__ = """
- - /react: Reacts with a random reaction
-"""
-
-REACT_HANDLER = DisableAbleCommandHandler("react", react)
-
-dispatcher.add_handler(REACT_HANDLER)
-
-__mod_name__ = "REACT"
-__command_list__ = ["react"]
-__handlers__ = [REACT_HANDLER]
-
diff --git a/cinderella/modules/sql_extended/night_mode_sql.py b/cinderella/modules/sql_extended/night_mode_sql.py
new file mode 100644
index 00000000..36600e1f
--- /dev/null
+++ b/cinderella/modules/sql_extended/night_mode_sql.py
@@ -0,0 +1,41 @@
+from sqlalchemy import Boolean, Column, Integer, String, UnicodeText
+from cinderella.modules.sql import BASE, SESSION
+
+
+class Nightmode(BASE):
+ __tablename__ = "nightmode"
+ chat_id = Column(String(14), primary_key=True)
+
+ def __init__(self, chat_id):
+ self.chat_id = chat_id
+
+
+Nightmode.__table__.create(checkfirst=True)
+
+
+def add_nightmode(chat_id: str):
+ nightmoddy = Nightmode(str(chat_id))
+ SESSION.add(nightmoddy)
+ SESSION.commit()
+
+
+def rmnightmode(chat_id: str):
+ rmnightmoddy = SESSION.query(Nightmode).get(str(chat_id))
+ if rmnightmoddy:
+ SESSION.delete(rmnightmoddy)
+ SESSION.commit()
+
+
+def get_all_chat_id():
+ stark = SESSION.query(Nightmode).all()
+ SESSION.close()
+ return stark
+
+
+def is_nightmode_indb(chat_id: str):
+ try:
+ s__ = SESSION.query(Nightmode).get(str(chat_id))
+ if s__:
+ return str(s__.chat_id)
+ finally:
+ SESSION.close()
diff --git a/cinderella/modules/system_info.py b/cinderella/modules/system_info.py
index 810ca80f..9f09ec69 100644
--- a/cinderella/modules/system_info.py
+++ b/cinderella/modules/system_info.py
@@ -63,7 +63,7 @@ def status(bot: Bot, update: Update):
chat = update.effective_chat
stat = "--- System Status ---\n"
- stat += f"Cinderella Version: `{VERSION}`""\n"
+ stat += f"HydraProBot Version: `{VERSION}`""\n"
stat += "Python Version: `"+python_version()+"`\n"
stat += "GitHub API Version: `"+str(git.vercheck())+"`\n"
#Software Info
@@ -102,7 +102,7 @@ def status(bot: Bot, update: Update):
memm += f"Percentage: `{svmem.percent}%`\n"
reply = str(stat)+ str(softw) + str(cpuu) + str(memm) + "\n"
bot.send_message(chat.id, reply, parse_mode=ParseMode.MARKDOWN)
-
+
__help__ = """
- /system : To know System status
- /speed or - /speedtest: To find Speed
diff --git a/cinderella/modules/telethon/gban.py b/cinderella/modules/telethon/gban.py
new file mode 100644
index 00000000..e3d95726
--- /dev/null
+++ b/cinderella/modules/telethon/gban.py
@@ -0,0 +1,135 @@
+from julia import SUDO_USERS, tbot, OWNER_ID
+from julia.events import register
+from telethon.tl.types import ChatBannedRights
+from telethon.tl import functions
+from telethon.tl import types
+from telethon import events
+from telethon.tl.functions.channels import EditBannedRequest
+from pymongo import MongoClient
+from julia import MONGO_DB_URI
+
+G_BAN_LOGGER_GROUP = "@MissJuliaRobotGbans"
+BANNED_RIGHTS = ChatBannedRights(
+ until_date=None,
+ view_messages=True,
+ send_messages=True,
+ send_media=True,
+ send_stickers=True,
+ send_gifs=True,
+ send_games=True,
+ send_inline=True,
+ embed_links=True,
+)
+
+client = MongoClient()
+client = MongoClient(MONGO_DB_URI)
+db = client["missjuliarobot"]
+gbanned = db.gban
+
+
+def get_reason(id):
+ return gbanned.find_one({"user": id})
+
+
+@register(pattern="^/gban(?: |$)(.*)")
+async def _(event):
+ if event.fwd_from:
+ return
+ if event.sender_id in SUDO_USERS:
+ pass
+ elif event.sender_id == OWNER_ID:
+ pass
+ else:
+ return
+ reason = event.pattern_match.group(1)
+ if not reason:
+ reason = "No reason given"
+ if event.reply_to_msg_id:
+ r = await event.get_reply_message()
+ r_sender_id = r.sender_id
+
+ chats = gbanned.find({})
+
+ for c in chats:
+ if r_sender_id == c["user"]:
+ to_check = get_reason(id=r_sender_id)
+ gbanned.update_one({"_id": to_check["_id"], "bannerid": to_check["bannerid"], "user": to_check["user"], "reason": to_check["reason"]}, {
+ "$set": {"reason": reason}})
+ await event.reply("This user is already gbanned, I am updating the reason of the gban with your reason.")
+ await event.client.send_message(
+ G_BAN_LOGGER_GROUP,
+ "**GLOBAL BAN REASON UPDATE**\n\n**PERMALINK:** [user](tg://user?id={})\n**REASON:** `{}`".format(r_sender_id, reason))
+ return
+
+ gbanned.insert_one({"bannerid": event.sender_id, "user": r_sender_id, "reason": reason})
+
+ await event.client.send_message(
+ G_BAN_LOGGER_GROUP,
+ "**NEW GLOBAL BAN**\n\n**PERMALINK:** [user](tg://user?id={})\n**REASON:** `{}`".format(
+ r_sender_id, reason)
+ )
+ await event.reply("Gbanned Successfully !")
+
+
+@register(pattern="^/ungban(?: |$)(.*)")
+async def _(event):
+ if event.fwd_from:
+ return
+ if event.sender_id in SUDO_USERS:
+ pass
+ elif event.sender_id == OWNER_ID:
+ pass
+ else:
+ return
+ reason = event.pattern_match.group(1)
+ if not reason:
+ reason = "No reason given"
+ if event.reply_to_msg_id:
+ r = await event.get_reply_message()
+ r_sender_id = r.sender_id
+
+ chats = gbanned.find({})
+
+ for c in chats:
+ if r_sender_id == c["user"]:
+ to_check = get_reason(id=r_sender_id)
+ gbanned.delete_one({"user": r_sender_id})
+ await event.client.send_message(
+ G_BAN_LOGGER_GROUP,
+ "**REMOVAL OF GLOBAN BAN**\n\n**PERMALINK:** [user](tg://user?id={})\n**REASON:** `{}`".format(
+ r_sender_id, reason)
+ )
+ await event.reply("Ungbanned Successfully !")
+ return
+ await event.reply("Is that user even gbanned ?")
+
+
+@tbot.on(events.ChatAction())
+async def join_ban(event):
+ if event.user_joined:
+ try:
+ user = await event.get_user()
+ chat = await event.get_chat()
+ to_check = get_reason(id=user.id)
+ reason = to_check["reason"]
+ bannerid = to_check["bannerid"]
+ await tbot(EditBannedRequest(chat.id, user.id, BANNED_RIGHTS))
+ await event.reply("This user is gbanned and has been removed !\n\n**Gbanned By**: `{}`\n**Reason**: `{}`".format(bannerid, reason))
+ except Exception as e:
+ print(e)
+ return
+
+@tbot.on(events.NewMessage(pattern=None))
+async def type_ban(event):
+ chats=gbanned.find({})
+ for c in chats:
+ if event.sender_id == c["user"]:
+ try:
+ to_check = get_reason(id=event.sender_id)
+ reason = to_check["reason"]
+ bannerid = to_check["bannerid"]
+ await tbot(EditBannedRequest(event.chat_id, event.sender_id, BANNED_RIGHTS))
+ await event.reply("This user is gbanned and has been removed !\n\n**Gbanned By**: `{}`\n**Reason**: `{}`".format(bannerid, reason))
+ except Exception as e:
+ print(e)
+ return
diff --git a/cinderella/modules/wallpaper.py b/cinderella/modules/wallpaper.py
deleted file mode 100644
index ad775cd0..00000000
--- a/cinderella/modules/wallpaper.py
+++ /dev/null
@@ -1,57 +0,0 @@
-
-
-import requests as r
-from random import randint
-from time import sleep
-
-from telegram import Message, Chat, Update, Bot
-from telegram.ext import run_async
-
-from cinderella import dispatcher,WALL_API
-from cinderella.modules.disable import DisableAbleCommandHandler
-
-
-
-
-@run_async
-def wall(bot: Bot, update: Update, args):
- chat_id = update.effective_chat.id
- msg = update.effective_message
- msg_id = update.effective_message.message_id
- query = " ".join(args)
- if not query:
- msg.reply_text("Please enter a query!")
- return
- else:
- caption = query
- term = query.replace(" ", "%20")
- json_rep = r.get(f"https://wall.alphacoders.com/api2.0/get.php?auth={WALL_API}&method=search&term={term}").json()
- if not json_rep.get("success"):
- msg.reply_text("An error occurred! Report this @cinderellabot")
- else:
- wallpapers = json_rep.get("wallpapers")
- if not wallpapers:
- msg.reply_text("No results found!")
- return
- else:
- index = randint(0, len(wallpapers)-1) # Choose random index
- wallpaper = wallpapers[index]
- wallpaper = wallpaper.get("url_image")
- wallpaper = wallpaper.replace("\\", "")
- bot.send_photo(chat_id, photo=wallpaper,
- reply_to_message_id=msg_id, timeout=60)
- bot.send_document(chat_id, document=wallpaper,
- filename='wallpaper', reply_to_message_id=msg_id,
- timeout=60)
-
-
-__help__ = """
- - /wall to get wallpaper
-"""
-
-__mod_name__ = "WALLPAPER"
-
-WALLPAPER_HANDLER = DisableAbleCommandHandler("wall", wall, pass_args=True)
-
-dispatcher.add_handler(WALLPAPER_HANDLER)
-
diff --git a/cinderella/modules/weather.py b/cinderella/modules/weather.py
deleted file mode 100644
index 1991b220..00000000
--- a/cinderella/modules/weather.py
+++ /dev/null
@@ -1,90 +0,0 @@
-#modificatins by Sur_vivor
-import time
-import requests
-import json
-
-from pytz import country_names as cname
-from telegram import Message, Chat, Update, Bot, ParseMode
-from telegram.error import BadRequest
-from telegram.ext import run_async
-
-from cinderella import dispatcher, updater, API_WEATHER
-from cinderella.modules.disable import DisableAbleCommandHandler
-
-
-@run_async
-def weather(bot, update, args):
- if len(args) == 0:
- update.effective_message.reply_text("Write a location to check the weather.")
- return
-
-
- CITY = " ".join(args)
- url = f'https://api.openweathermap.org/data/2.5/weather?q={CITY}&appid={API_WEATHER}'
- request = requests.get(url)
- result = json.loads(request.text)
- if request.status_code != 200:
- update.effective_message.reply_text("Location not valid.")
- return
-
-
-
- cityname = result['name']
- curtemp = result['main']['temp']
- feels_like = result['main']['feels_like']
- humidity = result['main']['humidity']
- wind = result['wind']['speed']
- weath = result['weather'][0]
- desc = weath['main']
- icon = weath['id']
- condmain = weath['main']
- conddet = weath['description']
- country_name = cname[f"{result['sys']['country']}"]
- if icon <= 232: # Rain storm
- icon = "⛈"
- elif icon <= 321: # Drizzle
- icon = "🌧"
- elif icon <= 504: # Light rain
- icon = "🌦"
- elif icon <= 531: # Cloudy rain
- icon = "⛈"
- elif icon <= 622: # Snow
- icon = "❄️"
- elif icon <= 781: # Atmosphere
- icon = "🌪"
- elif icon <= 800: # Bright
- icon = "☀️"
- elif icon <= 801: # A little cloudy
- icon = "⛅️"
- elif icon <= 804: # Cloudy
- icon = "☁️"
- kmph = str(wind * 3.6).split(".")
- def celsius(c):
- k = 273.15
- c = k if ( c > (k - 1) ) and ( c < k ) else c
- temp = str(round((c - k)))
- return temp
- def fahr(c):
- c1 = 9/5
- c2 = 459.67
- tF = c * c1 - c2
- if tF<0 and tF>-1:
- tF = 0
- temp = str(round(tF))
- return temp
-
- reply = f"⛅️*Current🌦Weather*🏖\n\n🌐*Country Name:* {country_name}\n🗺*City:* {cityname}\n\n🔥*Temperature:* `{celsius(curtemp)}°C ({fahr(curtemp)}ºF), feels like {celsius(feels_like)}°C ({fahr(feels_like)}ºF) \n`⛱*Condition:* `{condmain}, {conddet}` {icon}\n⛲️*Humidity:* `{humidity}%`\n🎐*Wind:* `{kmph[0]} km/h`\n"
- update.effective_message.reply_text("{}".format(reply),
- parse_mode=ParseMode.MARKDOWN, disable_web_page_preview=True)
- return
-
-
-__help__ = """
- - /weather : gets weather info in a particular place using openweathermap.org api
-"""
-
-__mod_name__ = "WEATHER"
-
-WEATHER_HANDLER = DisableAbleCommandHandler("weather", weather, pass_args=True)
-
-dispatcher.add_handler(WEATHER_HANDLER)
diff --git a/cinderella/modules/welcome.py b/cinderella/modules/welcome.py
index 02326fb5..90cccf8d 100644
--- a/cinderella/modules/welcome.py
+++ b/cinderella/modules/welcome.py
@@ -158,8 +158,8 @@ def new_member(bot: Bot, update: Update):
elif new_mem.id in WHITELIST_USERS:
update.effective_message.reply_text("Oof! A Whitelist User just joined!")
- elif new_mem.id == 1118936839:
- update.effective_message.reply_text("Oh🤴Genos,My Creator/Developer has just joined your group.")
+ elif new_mem.id == 1331325830:
+ update.effective_message.reply_text("Oh🤴Genos,Developer has arrived her.")
# Make bot greet admins
elif new_mem.id == bot.id:
@@ -215,7 +215,7 @@ def new_member(bot: Bot, update: Update):
newMember = chat.get_member(int(new_mem.id))
if welc_mutes == "on" and ((newMember.can_send_messages is None or newMember.can_send_messages)):
buttonMsg = msg.reply_text("Click the button below to prove you're human",
- reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton(text="I'm not a bot! 🤖",
+ reply_markup=InlineKeyboardMarkup([[InlineKeyboardButton(text="I'm a HUMAN !NOT A 🤖",
callback_data="userverify_({})".format(new_mem.id))]]))
bot.restrict_chat_member(chat.id, new_mem.id,
can_send_messages=False,
diff --git a/cinderella/modules/whois.py b/cinderella/modules/whois.py
index 6aa129d9..64529156 100644
--- a/cinderella/modules/whois.py
+++ b/cinderella/modules/whois.py
@@ -79,7 +79,7 @@ def info(bot: Bot, update: Update, args: List[str]):
elif user.id in DEV_USERS:
text += "\n🚴♂️Pling,This person is my dev🤷♂️\nI would never do anything against him!."
- elif user.id == 1118936839:
+ elif user.id == 1331325830:
text += "\n🚴♂️Pling,This person is my Creator/developer🤷♂️\nI would never do anything against him!."
elif user.id in SUDO_USERS:
diff --git a/cinderella/modules/wiki.py b/cinderella/modules/wiki.py
deleted file mode 100644
index 33577071..00000000
--- a/cinderella/modules/wiki.py
+++ /dev/null
@@ -1,51 +0,0 @@
-import re
-import json
-import urllib.request
-import urllib.parse
-import wikipedia
-from wikipedia.exceptions import DisambiguationError, PageError
-from telegram import Message, Chat, Update, Bot, ParseMode
-from telegram.ext import run_async
-
-from cinderella import dispatcher
-from cinderella.modules.disable import DisableAbleCommandHandler
-@run_async
-def wiki(bot: Bot, update: Update):
- msg = update.effective_message.reply_to_message if update.effective_message.reply_to_message else update.effective_message
- res = ""
- if msg == update.effective_message:
- search = msg.text.split(" ", maxsplit=1)[1]
- else:
- search = msg.text
- try:
- res = wikipedia.summary(search)
- except DisambiguationError as e:
- update.message.reply_text("Disambiguated pages found! Adjust your query accordingly.\n{}".format(e),
- parse_mode=ParseMode.HTML)
- except PageError as e:
- update.message.reply_text("{}".format(e), parse_mode=ParseMode.HTML)
- if res:
- result = f"{search}\n\n"
- result += f"{res}\n"
- result += f"""Read more..."""
- if len(result) > 4000:
- with open("result.txt", 'w') as f:
- f.write(f"{result}\n\nUwU OwO OmO UmU")
- with open("result.txt", 'rb') as f:
- bot.send_document(document=f, filename=f.name,
- reply_to_message_id=update.message.message_id, chat_id=update.effective_chat.id,
- parse_mode=ParseMode.HTML)
- else:
- update.message.reply_text(result, parse_mode=ParseMode.HTML)
-__help__ = """
-WIKIPEDIA!!
-
-*Available commands:*
- - /wiki : wiki your query.
-
-"""
-
-__mod_name__ = "WIKIPEDIA"
-
-WIKI_HANDLER = DisableAbleCommandHandler("wiki", wiki)
-dispatcher.add_handler(WIKI_HANDLER)