Skip to content

Commit

Permalink
updated
Browse files Browse the repository at this point in the history
  • Loading branch information
sandy1709 committed Apr 18, 2020
1 parent e5b001a commit f38fd98
Show file tree
Hide file tree
Showing 129 changed files with 3,605 additions and 5,538 deletions.
3 changes: 0 additions & 3 deletions FUNDING.yml

This file was deleted.

1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

# FORK AT YOUR OWN RISK
# Documentation/Guide, visit [How2Techy](https://how2techy.com/x-tra-userbot-plugin-guide-part1/)
# Installing
### The Easy Way
[![Deploy To Heroku](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy)
Expand Down
36 changes: 2 additions & 34 deletions app.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
{
<<<<<<< HEAD
"name": "π.$",
"description": "Userbot created by a SNAPDRAGON and custom fork by https://t.me/mrconfused contact @mrconfused for support",
"logo": "https://telegra.ph/file/f8ab330abd9a8a43f5a40.jpg",
=======
"name": "X-tra Telegram",
"description": "Userbot created by a SNAPDRAGON and custom fork by ANUBIS\n\n join https://t.me/XtraTgChat for any problems or support",
"logo": "https://telegra.ph/file/1be6c59f53fef57b5745b.jpg",
>>>>>>> e5ef0b3993bbed07fa8182df63a2a5da234c5941
"keywords": [
"telegram",
"userbot",
Expand All @@ -25,12 +19,12 @@
},
"TEMP_DOWNLOAD_DIRECTORY": {
"description": "Where downloaded files will go.",
"value": "./userbot/DOWNLOADS/",
"value": "./DOWNLOADS/",
"required": false
},
"ALIVE_NAME": {
"description": "give your name",
"required": false
"value": ""
},
"APP_ID": {
"description": "Get this value from my.telegram.org! Please do not steal",
Expand All @@ -44,7 +38,6 @@
"description": "Get this value by running python3 telesetup.py locally",
"value": ""
},
<<<<<<< HEAD
"TG_BOT_USER_NAME_BF_HER": {
"description": "Needed for inline buttons maker. Make a bot at http://telegram.dog/BotFather and get the username of your bot",
"value": ""
Expand All @@ -56,11 +49,6 @@
"MAX_FLOOD_IN_P_M_s": {
"description": "Maximum number of messages a person can send in pm before getting blocked. Value must be an integer. 3 by default.",
"value": "5",
=======
"MAX_FLOOD_IN_P_M_s": {
"description": "Maximum number of messages a person can send in pm before getting blocked. Value must be an integer. 3 by default.",
"value": "3",
>>>>>>> e5ef0b3993bbed07fa8182df63a2a5da234c5941
"required": false
},
"OCR_SPACE_API_KEY": {
Expand Down Expand Up @@ -90,16 +78,7 @@
},
"SUDO_USERS": {
"description": "Makes your acc and bot stable",
<<<<<<< HEAD
"value": "916234223",
=======
"value": "742506768",
"required": false
},
"TG_BOT_TOKEN_BF_HER": {
"description": "Needed for inline buttons maker. Make a bot at http://telegram.dog/BotFather and get the token of your bot.Worth it. Get it.",
"value": "",
>>>>>>> e5ef0b3993bbed07fa8182df63a2a5da234c5941
"required": false
},
"CHROME_BIN": {
Expand All @@ -112,20 +91,9 @@
"value": "/app/.chromedriver/bin/chromedriver",
"required": false
},
<<<<<<< HEAD
"DOWNLOAD_PFP_URL_CLOCK": {
"description": "Needed for autopic module. A url that is a preview link of your Profile Pic",
"value": "https://telegra.ph/file/f8ab330abd9a8a43f5a40.jpg",
=======
"TG_BOT_USER_NAME_BF_HER": {
"description": "Needed for inline buttons maker. Make a bot at http://telegram.dog/BotFather and get the username of your bot",
"value": "",
"required": false
},
"DOWNLOAD_PFP_URL_CLOCK": {
"description": "Needed for autopic module. A url that is a preview link of your Profile Pic",
"value": "",
>>>>>>> e5ef0b3993bbed07fa8182df63a2a5da234c5941
"required": false
},
"TZ": {
Expand Down
6 changes: 0 additions & 6 deletions heroku_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,14 @@ class Var(object):
HEROKU_API_KEY = os.environ.get("HEROKU_API_KEY", None)
HEROKU_APP_NAME = os.environ.get("HEROKU_APP_NAME", None)
TG_BOT_TOKEN_BF_HER = os.environ.get("TG_BOT_TOKEN_BF_HER", None)
# Send .get_id in any channel to fill this value.
PLUGIN_CHANNEL = int(os.environ.get("PLUGIN_CHANNEL", -100))
TG_BOT_USER_NAME_BF_HER = os.environ.get("TG_BOT_USER_NAME_BF_HER", None)
NO_SONGS = bool(os.environ.get("NO_SONGS", False))
DOWNLOAD_PFP_URL_CLOCK = os.environ.get("DOWNLOAD_PFP_URL_CLOCK", None)
G_DRIVE_CLIENT_ID = os.environ.get("G_DRIVE_CLIENT_ID", None)
G_DRIVE_CLIENT_SECRET = os.environ.get("G_DRIVE_CLIENT_SECRET", None)
GDRIVE_FOLDER_ID = os.environ.get("GDRIVE_FOLDER_ID", "root")
AUTH_TOKEN_DATA = os.environ.get("AUTH_TOKEN_DATA", None)
<<<<<<< HEAD
MAX_FLOOD_IN_P_M_s = int(os.environ.get("MAX_FLOOD_IN_P_M_s", 5))
=======
MAX_FLOOD_IN_P_M_s = int(os.environ.get("MAX_FLOOD_IN_P_M_s", 3))
>>>>>>> e5ef0b3993bbed07fa8182df63a2a5da234c5941
if AUTH_TOKEN_DATA != None:
if not os.path.isdir(TEMP_DOWNLOAD_DIRECTORY):
os.makedirs(TEMP_DOWNLOAD_DIRECTORY)
Expand Down
5 changes: 3 additions & 2 deletions requirements-startup.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Pillow>=5.3.0
PyDrive
PyGithub
PyLyrics
PyPDF2
SQLAlchemy
aiofiles
Expand All @@ -12,7 +13,7 @@ aria2p
async_generator
asyncio
asyncurban
beautifulsoup4==4.6.0
beautifulsoup4==4.8.1
bs4
bwb==3.0.0
cfscrape
Expand Down Expand Up @@ -50,7 +51,6 @@ jotquote
kwot
langdetect
lxml
lyricsgenius
mtranslate
names
nltk
Expand Down Expand Up @@ -87,6 +87,7 @@ search-engine-parser
selenium
setuptools>=40.3.0
spamwatch
spcli
speedtest-cli
spotify_token
sqlalchemy
Expand Down
4 changes: 0 additions & 4 deletions userbot/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,6 @@
# Console verbose logging
CONSOLE_LOGGER_VERBOSE = sb(os.environ.get("CONSOLE_LOGGER_VERBOSE", "False"))

# Genius lyrics get this value from https://genius.com/developers both has same values
GENIUS_API_TOKEN = os.environ.get("GENIUS", None)
# Genius lyrics get this value from https://genius.com/developers both has same values
GENIUS = os.environ.get("GENIUS_API_TOKEN", None)
# SQL Database URI
DB_URI = os.environ.get("DATABASE_URL", None)

Expand Down
11 changes: 6 additions & 5 deletions userbot/plugins/_helper.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
from userbot import CMD_LIST
from userbot import ALIVE_NAME
from userbot.utils import admin_cmd
from platform import uname

DEFAULTUSER = str(ALIVE_NAME) if ALIVE_NAME else "@mrconfused"

@command(pattern="^.help ?(.*)")
async def cmd_list(event):
Expand Down Expand Up @@ -28,11 +33,7 @@ async def cmd_list(event):
else:
await event.edit(input_str + " is not a valid plugin!")
else:
<<<<<<< HEAD
help_string = """Userbot Helper.. Provided by @mrconfused \n\n
=======
help_string = """Userbot Helper.. Provided by @A_Dark_Princ3 \n[Check out this dope af website](https://www.moddingunited.xyz/) \n
>>>>>>> e5ef0b3993bbed07fa8182df63a2a5da234c5941
help_string = f"""Userbot Helper.. Provided by {DEFAULTUSER} \n\n
`Userbot Helper to reveal all the commands`\n__Do .help plugin_name for commands, in case popup doesn't appear.__"""
results = await bot.inline_query( # pylint:disable=E0602
tgbotusername,
Expand Down
4 changes: 2 additions & 2 deletions userbot/plugins/_inlinebot.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def paginate_help(page_number, loaded_plugins, prefix):
if len(pairs) > number_of_rows:
pairs = pairs[modulo_page * number_of_rows:number_of_rows * (modulo_page + 1)] + \
[
(custom.Button.inline("Previous", data="{}_prev({})".format(prefix, modulo_page)),
custom.Button.inline("Next", data="{}_next({})".format(prefix, modulo_page)))
(custom.Button.inline("", data="{}_prev({})".format(prefix, modulo_page)),
custom.Button.inline("", data="{}_next({})".format(prefix, modulo_page)))
]
return pairs
75 changes: 0 additions & 75 deletions userbot/plugins/acc_profile.py

This file was deleted.

83 changes: 0 additions & 83 deletions userbot/plugins/add_watermark

This file was deleted.

11 changes: 0 additions & 11 deletions userbot/plugins/afk.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,7 @@ async def set_not_afk(event):
event.chat_id,
"Please set `PRIVATE_GROUP_BOT_API_ID` " + \
"for the proper functioning of afk functionality " + \
<<<<<<< HEAD
"check pinned message in @xtragbot.\n\n `{}`".format(str(e)),
=======
"in @xtratgbot\nCheck pinned message for more info.\n\n `{}`".format(str(e)),
>>>>>>> e5ef0b3993bbed07fa8182df63a2a5da234c5941
reply_to=event.message.id,
silent=True
)
Expand Down Expand Up @@ -149,17 +145,10 @@ async def on_afk(event):
else:
afk_since = f"`{int(seconds)}s` **ago**"
msg = None
<<<<<<< HEAD
message_to_reply = f"__My Master Has Been Gone For__ `{total_afk_time}`\nWhere He Is: ONLY GOD KNOWS " + \
f"\n\n__I promise I'll back in a few light years__\n**REASON**: {reason}" \
if reason \
else f"**Heya!**\n__I am currently unavailable. Since when, you ask? For {total_afk_time} I guess.__\n\nWhen will I be back? Soon __Whenever I feel like it__**( ಠ ʖ̯ ಠ)** "
=======
message_to_reply = f"__My Master Has Been Gone For__ `{total_afk_time}`\nWhere He Is: ~~ONLY GOD KNOWS~~ " + \
f"\n\n__I promise I'll back in a few light years__\n**REASON**: {reason}" \
if reason \
else f"**Heya!**\n__I am currently unavailable. Since when, you ask? For {total_afk_time} I guess.__\n\nWhen will I be back? ~~Soon~~ __Whenever I feel like it__**( ಠ ʖ̯ ಠ)** "
>>>>>>> e5ef0b3993bbed07fa8182df63a2a5da234c5941
msg = await event.reply(message_to_reply)
await asyncio.sleep(5)
if event.chat_id in last_afk_message: # pylint:disable=E0602
Expand Down
Loading

0 comments on commit f38fd98

Please sign in to comment.