Skip to content

Commit ca57766

Browse files
authored
catuserbot version 2.10.2 (TgCatUB#150)
1 parent 192f76c commit ca57766

57 files changed

Lines changed: 1204 additions & 2140 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/pylint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
isort .
2424
- name: lint with black
2525
run: |
26-
black --exclude "exampleconfig.py" .
26+
black --exclude "exampleconfig\.py" .
2727
# commit changes
2828
- uses: stefanzweifel/git-auto-commit-action@v4
2929
with:

.github/workflows/pythonapp.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- name: Check for showstoppers
2727
run: |
2828
# stop the build if there are Python syntax errors
29-
flake8 . --count --select=E999 --show-source --statistics
29+
flake8 . --count --select=E999 --show-source --statistics --exclude="exampleconfig.py"
3030
shellcheck:
3131

3232
runs-on: ubuntu-latest

app.json

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
},
2020
"TMP_DOWNLOAD_DIRECTORY": {
2121
"description": "Where downloaded files will go.",
22-
"value": "./DOWNLOADS/",
22+
"value": "./downloads/",
2323
"required": false
2424
},
2525
"ALIVE_NAME": {
@@ -35,7 +35,7 @@
3535
"value": ""
3636
},
3737
"STRING_SESSION": {
38-
"description": "Get this value by running python3 telesetup.py locally",
38+
"description": "Get this value by running python3 telesetup.py locally or https://generatestringsession.sandeep1709.repl.run",
3939
"value": ""
4040
},
4141
"TG_BOT_USER_NAME_BF_HER": {
@@ -91,11 +91,6 @@
9191
"value": "",
9292
"required": false
9393
},
94-
"UB_BLACK_LIST_CHAT": {
95-
"description": "set blacklist_chats where you do not want userbot features",
96-
"value": "-1051754159",
97-
"required": false
98-
},
9994
"DOWNLOAD_PFP_URL_CLOCK": {
10095
"description": "Needed for autopic module. A url that is a preview link of your Profile Pic",
10196
"value": "",

requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ setuptools
33
wheel
44
aiofiles
55
aiohttp
6-
asyncurban
76
beautifulsoup4
87
cairosvg
98
cfscrape
@@ -24,7 +23,7 @@ glitch_this
2423
google-api-python-client
2524
google-auth-httplib2
2625
google-auth-oauthlib
27-
googletrans==3.1.0a0
26+
googletrans==4.0.0-rc1
2827
gsearch
2928
gtts
3029
hachoir
@@ -68,4 +67,5 @@ validators
6867
vcsi
6968
wand
7069
wikipedia
71-
youtube_dl > 2020.11.12
70+
youtube_dl
71+
youtube-search-python

sample_config.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,6 @@ class Config(object):
163163
PM_LOGGR_BOT_API_ID = int(PM_LOGGR_BOT_API_ID)
164164
# to work manager.py
165165
DUAL_LOG = os.environ.get("DUAL_LOG", False)
166-
YOUTUBE_API_KEY = os.environ.get("YOUTUBE_API_KEY", None)
167166
# MONGOCLIENT = pymongo.MongoClient(MONGO_DB_URI)
168167
# MONGO = MONGOCLIENT.userbot
169168
# JustWatch Country

userbot/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from .Config import Config
1414

1515
StartTime = time.time()
16-
catversion = "2.10.1"
16+
catversion = "2.10.2"
1717

1818
if Config.STRING_SESSION:
1919
session_name = str(Config.STRING_SESSION)

userbot/__main__.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,26 @@ async def add_bot(bot_token):
4444

4545
LOGS.info("Yay your userbot is officially working.!!!")
4646
LOGS.info(
47-
"Congratulation, now type .alive to see message if bot is live\n"
48-
"If you need assistance, head to https://t.me/catuserbot_support"
47+
"Congratulation, now type .alive to see message if bot is live\
48+
\nIf you need assistance, head to https://t.me/catuserbot_support"
4949
)
5050

51+
52+
async def startupmessage():
53+
try:
54+
if Config.PRIVATE_GROUP_BOT_API_ID:
55+
await bot.send_message(
56+
Config.PRIVATE_GROUP_BOT_API_ID,
57+
"**Congratulation, now type .alive to see message if bot is live\
58+
\nIf you need assistance, **head to https://t.me/catuserbot_support",
59+
link_preview=False,
60+
)
61+
except Exception:
62+
pass
63+
64+
65+
bot.loop.create_task(startupmessage())
66+
5167
if len(argv) not in (1, 3, 4):
5268
bot.disconnect()
5369
else:

0 commit comments

Comments
 (0)