Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch 8 #177

Open
wants to merge 4 commits into
base: Master
Choose a base branch
from
Open

Patch 8 #177

wants to merge 4 commits into from

Conversation

Randibo
Copy link

@Randibo Randibo commented Jun 15, 2024

import re
from os import getenv

------------------------------------

------------------------------------

from dotenv import load_dotenv
from pyrogram import filters

------------------------------------

------------------------------------

load_dotenv()

------------------------------------

-----------------------------------------------------

API_ID = int(getenv("API_ID"))
API_HASH = getenv("API_HASH")

------------------------------------------------------

BOT_TOKEN = getenv("BOT_TOKEN")

-------------------------------------------------------

OWNER_USERNAME = getenv("OWNER_USERNAME","Ore_wa_Madara_Uchiha")

--------------------------------------------------------

BOT_USERNAME = getenv("BOT_USERNAME" , "Shizuka_family_bot")

--------------------------------------------------------

BOT_NAME = getenv("BOT_NAME" , "Shizuka")

---------------------------------------------------------

ASSUSERNAME = getenv("ASSUSERNAME" , "Assistant_60")

---------------------------------------------------------

#---------------------------------------------------------------
#---------------------------------------------------------------
MONGO_DB_URI = getenv("MONGO_DB_URI", None)
#---------------------------------------------------------------
#---------------------------------------------------------------

----------------------------------------------------------------

DURATION_LIMIT_MIN = int(getenv("DURATION_LIMIT", 17000))

----------------------------------------------------------------

----------------------------------------------------------------

LOGGER_ID = int(getenv("LOGGER_ID",-1002220602535))

----------------------------------------------------------------

----------------------------------------------------------------

OWNER_ID = int(getenv("OWNER_ID", 6203163206))

-----------------------------------------------------------------

-----------------------------------------------------------------

----------------------------------------------------------------

----------------------------------------------------------------

----------------------------------------------------------------

HEROKU_APP_NAME = getenv("HEROKU_APP_NAME")

----------------------------------------------------------------

HEROKU_API_KEY = getenv("HEROKU_API_KEY")

----------------------------------------------------------------

----------------------------------------------------------------

----------------------------------------------------------------

UPSTREAM_REPO = getenv(
"UPSTREAM_REPO",
"https://github.com/Harshmanjhi/DAXXMUSIC",
)
UPSTREAM_BRANCH = getenv("UPSTREAM_BRANCH", "Master")
GIT_TOKEN = getenv(
"GIT_TOKEN", None
) # ----------------------------------------------------------------

-------------------------------------------------------------------

--------------------------------------------------------------------

--------------------------------------------------------------------

------------------------------------------------------------------------

-------------------------------------------------------------------------

SUPPORT_CHANNEL = getenv("SUPPORT_CHANNEL", "https://t.me/SUKUNA_UPDATE_CHANNEL")
SUPPORT_CHAT = getenv("SUPPORT_CHAT", "https://t.me/DARK_DREAM_WORLD")

------------------------------------------------------------------------------

-------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

AUTO_LEAVING_ASSISTANT = getenv("AUTO_LEAVING_ASSISTANT", "True")
AUTO_LEAVE_ASSISTANT_TIME = int(getenv("ASSISTANT_LEAVE_TIME", "9000"))
SONG_DOWNLOAD_DURATION = int(getenv("SONG_DOWNLOAD_DURATION", "9999999"))
SONG_DOWNLOAD_DURATION_LIMIT = int(getenv("SONG_DOWNLOAD_DURATION_LIMIT", "9999999"))

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

---------------------------------------------------------------------------------

SPOTIFY_CLIENT_ID = getenv("SPOTIFY_CLIENT_ID", "1c21247d714244ddbb09925dac565aed")
SPOTIFY_CLIENT_SECRET = getenv("SPOTIFY_CLIENT_SECRET", "709e1a2969664491b58200860623ef19")

----------------------------------------------------------------------------------

-----------------------------------------------------------------------------------

PLAYLIST_FETCH_LIMIT = int(getenv("PLAYLIST_FETCH_LIMIT", 25))

------------------------------------------------------------------------------------

------------------------------------------------------------------------------------

TG_AUDIO_FILESIZE_LIMIT = int(getenv("TG_AUDIO_FILESIZE_LIMIT", "5242880000"))
TG_VIDEO_FILESIZE_LIMIT = int(getenv("TG_VIDEO_FILESIZE_LIMIT", "5242880000"))

--------------------------------------------------------------------------------------

---------------------------------------------------------------------------------------

------------------------------------

------------------------------------

------------------------------------

------------------------------------

STRING1 = getenv("STRING_SESSION", None)
STRING2 = getenv("STRING_SESSION2", None)
STRING3 = getenv("STRING_SESSION3", None)
STRING4 = getenv("STRING_SESSION4", None)
STRING5 = getenv("STRING_SESSION5", None)
STRING6 = getenv("STRING_SESSION6", None)
STRING7 = getenv("STRING_SESSION7", None)
BANNED_USERS = filters.user()
adminlist = {}
lyrical = {}
votemode = {}
autoclean = []
confirmer = {}

------------------------------------

------------------------------------

------------------------------------

------------------------------------

------------------------------------------------------------------------

------------------------------------------------------------------------

------------------------------------------------------------------------

------------------------------------------------------------------------

------------------------------------------------------------------------

------------------------------------------------------------------------

------------------------------------------------------------------------

START_IMG_URL = getenv(
"START_IMG_URL", "https://telegra.ph/file/cfbdee8103102bcb2e5da.jpg"
)
PING_IMG_URL = getenv(
"PING_IMG_URL", "https://telegra.ph/file/00360393a15daf7fc4e9d.jpg"
)
PLAYLIST_IMG_URL = "https://telegra.ph/file/d723f4c80da157fca1678.jpg"
STATS_IMG_URL = "https://telegra.ph/file/d30d11c4365c025c25e3e.jpg"
TELEGRAM_AUDIO_URL = "https://telegra.ph/file/48f39202823b358203234.jpg"
TELEGRAM_VIDEO_URL = "https://telegra.ph/file/e575ae40d6635250974e1.jpg"
STREAM_IMG_URL = "https://telegra.ph/file/03efec694e41e891b29dc.jpg"
SOUNCLOUD_IMG_URL = "https://telegra.ph/file/d723f4c80da157fca1678.jpg"
YOUTUBE_IMG_URL = "https://telegra.ph/file/4dc854f961cd3ce46899b.jpg"
SPOTIFY_ARTIST_IMG_URL = "https://telegra.ph/file/d723f4c80da157fca1678.jpg"
SPOTIFY_ALBUM_IMG_URL = "https://telegra.ph/file/6c741a6bc1e1663ac96fc.jpg"
SPOTIFY_PLAYLIST_IMG_URL = "https://telegra.ph/file/6c741a6bc1e1663ac96fc.jpg"

------------------------------------------------------------------------

------------------------------------------------------------------------

------------------------------------------------------------------------

------------------------------------------------------------------------

def time_to_seconds(time):
stringt = str(time)
return sum(int(x) * 60**i for i, x in enumerate(reversed(stringt.split(":"))))

DURATION_LIMIT = int(time_to_seconds(f"{DURATION_LIMIT_MIN}:00"))

-----------------------------------------------------------------------------

-----------------------------------------------------------------------------

------------------------------------------------------------------------------

if SUPPORT_CHANNEL:
if not re.match("(?:http|https)://", SUPPORT_CHANNEL):
raise SystemExit(
"[ERROR] - Your SUPPORT_CHANNEL url is wrong. Please ensure that it starts with https://"
)

if SUPPORT_CHAT:
if not re.match("(?:http|https)://", SUPPORT_CHAT):
raise SystemExit(
"[ERROR] - Your SUPPORT_CHAT url is wrong. Please ensure that it starts with https://"
)

---------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------

----------------------------------------------------------------------------------------

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants