Skip to content

Commit

Permalink
Merge pull request #5 from ShivshankarOfficial/main
Browse files Browse the repository at this point in the history
latest version of python has been updated. & Fixed & Better...
  • Loading branch information
DigitalBotz authored Jun 16, 2024
2 parents f572d29 + 16a9298 commit 1cd837b
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 21 deletions.
18 changes: 15 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
FROM python:3.10
# Use the official Python image
FROM python:3.9-slim-buster

# Set the working directory in the container
WORKDIR /app
COPY . /app/
RUN pip install -r requirements.txt

# Copy the dependencies file to the working directory
COPY requirements.txt .

# Install any needed dependencies specified in requirements.txt
RUN pip install --no-cache-dir -r requirements.txt

# Copy the rest of the application code to the working directory
COPY . .

# Command to run the application
CMD ["python", "bot.py"]
4 changes: 2 additions & 2 deletions Procfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
web: python bot.py
worker: python bot.py
web: python3 bot.py
worker: python3 bot.py
3 changes: 3 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
"buildpacks": [
{
"url": "heroku/python"
},
{
"url": "https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest"
}
]
}
21 changes: 13 additions & 8 deletions config.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
id_pattern = re.compile(r'^.\d+$')

class Config(object):
# pyro client config
# digital_botz client config
API_ID = os.environ.get("API_ID", "")
API_HASH = os.environ.get("API_HASH", "")
BOT_TOKEN = os.environ.get("BOT_TOKEN", "")
Expand All @@ -24,9 +24,14 @@ class Config(object):
# other configs
RKN_PIC = os.environ.get("RKN_PIC", "https://telegra.ph/file/b746aadfe59959eb76f59.jpg")
ADMIN = [int(admin) if id_pattern.search(admin) else admin for admin in os.environ.get('ADMIN', '6705898491').split()]
FORCE_SUB = os.environ.get("FORCE_SUB", "Digital_Botz")
LOG_CHANNEL = int(os.environ.get("LOG_CHANNEL", "-1002123429361"))

#force subs
try:
FORCE_SUB = int(os.environ.get("FORCE_SUB", ""))
except:
FORCE_SUB = os.environ.get("FORCE_SUB", "Digital_Botz")

# wes response configuration
PORT = int(os.environ.get("PORT", "8080"))
BOT_UPTIME = time.time()
Expand Down Expand Up @@ -61,12 +66,12 @@ class rkn(object):
"""

UPGRADE= """
•⪼ ★𝘗𝘭𝘢𝘯𝘴 - ⏳𝘋𝘢𝘵𝘦 - 💸𝘗𝘳𝘪𝘤𝘦
•⪼ 🥉𝘉𝘳𝘰𝘯𝘻𝘦 - 3𝘥𝘢𝘺𝘴 - 39
•⪼ 🥈𝘚𝘪𝘭𝘷𝘦𝘳 - 7𝘥𝘢𝘺𝘴 - 59
•⪼ 🥇𝘎𝘰𝘭𝘥 - 15𝘥𝘢𝘺𝘴 - 99
•⪼ 🏆𝘗𝘭𝘢𝘵𝘪𝘯𝘶𝘮 - 1𝘮𝘰𝘯𝘵𝘩 - 179
•⪼ 💎𝘋𝘪𝘢𝘮𝘰𝘯𝘥 - 2𝘮𝘰𝘯𝘵𝘩 - 339
•⪼ ★𝘗𝘭𝘢𝘯𝘴 - ⏳𝘋𝘢𝘵𝘦 - 💸𝘗𝘳𝘪𝘤𝘦
•⪼ 🥉𝘉𝘳𝘰𝘯𝘻𝘦 - 3𝘥𝘢𝘺𝘴 - 39
•⪼ 🥈𝘚𝘪𝘭𝘷𝘦𝘳 - 7𝘥𝘢𝘺𝘴 - 59
•⪼ 🥇𝘎𝘰𝘭𝘥 - 15𝘥𝘢𝘺𝘴 - 99
•⪼ 🏆𝘗𝘭𝘢𝘵𝘪𝘯𝘶𝘮 - 1𝘮𝘰𝘯𝘵𝘩 - 179
•⪼ 💎𝘋𝘪𝘢𝘮𝘰𝘯𝘥 - 2𝘮𝘰𝘯𝘵𝘩 - 339
- 𝘋𝘢𝘪𝘭𝘺 𝘜𝘱𝘭𝘰𝘢𝘥 𝘓𝘪𝘮𝘪𝘵 𝘜𝘯𝘭𝘪𝘮𝘪𝘵𝘦𝘥
- 𝘋𝘪𝘴𝘤𝘰𝘶𝘯𝘵 𝘈𝘭𝘭 𝘗𝘭𝘢𝘯 𝘙𝘴.9
Expand Down
4 changes: 2 additions & 2 deletions plugins/file_rename.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ async def doc(bot, update):
file_path = f"downloads/{new_filename}"
file = update.message.reply_to_message

ms = await update.message.edit("`ᴛʀʏ ᴛᴏ ᴅᴏᴡɴʟᴏᴀᴅ....`")
ms = await update.message.edit("`Tʀʏ Tᴏ Dᴏᴡɴʟᴏᴀᴅ....`")
try:
path = await bot.download_media(message=file, file_name=file_path, progress=progress_for_pyrogram, progress_args=("ᴅᴏᴡɴʟᴏᴀᴅ sᴛᴀʀᴛᴇᴅ....", ms, time.time()))
except Exception as e:
Expand All @@ -132,7 +132,7 @@ async def doc(bot, update):
pass
await ms.edit("**Metadata added to the file successfully ✅**\n\n**Tʀyɪɴɢ Tᴏ Uᴩʟᴏᴀᴅɪɴɢ....**")
else:
await ms.edit("`ᴛʀʏɪɴɢ ᴛᴏ ᴜᴩʟᴏᴀᴅɪɴɢ....`")
await ms.edit("`Tʀʏɪɴɢ Tᴏ Uᴩʟᴏᴀᴅɪɴɢ....`")

duration = 0
try:
Expand Down
8 changes: 4 additions & 4 deletions render.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
services:
- type: web
plan: free
name: RknFileRenameBot
name: Digital-Rename-Bot
env: python
buildCommand: pip install -r requirements.txt
startCommand: python bot.py
repo: https://github.com/RknDeveloper/Rkn-Powerful-Rename-Bot.git
startCommand: python3 bot.py
repo: https://github.com/DigitalBotz/Digital-Rename-Bot.git
branch: main
autoDeploy: false
envVars:
Expand All @@ -27,5 +27,5 @@ services:
sync: false
- key: ADMIN
sync: false
- key: WEBHOOK
- key: STRING_SESSION
sync: false
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pyrogram==2.0.93
TgCrypto==1.2.5
TgCrypto
motor
dnspython
hachoir
Expand Down
2 changes: 1 addition & 1 deletion runtime.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python-3.10.8
python-3.12.4

0 comments on commit 1cd837b

Please sign in to comment.