GithubHelp home page GithubHelp logo

import re from os import getenv

from dotenv import load_dotenv from pyrogram import filters

load_dotenv()

Get this value from my.telegram.org/apps

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

Get your token from @BotFather on Telegram.

BOT_TOKEN = getenv("BOT_TOKEN")

Get your mongo url from cloud.mongodb.com

MONGO_DB_URI = getenv("MONGO_DB_URI", None) MUSIC_BOT_NAME = getenv("MUSIC_BOT_NAME", None) PRIVATE_BOT_MODE = getenv("PRIVATE_BOT_MODE", None)

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

Chat id of a group for logging bot's activities

LOGGER_ID = int(getenv("LOGGER_ID", None))

Get this value from @BRANDRD_ROBOT on Telegram by /id

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

Fill these variables if you're deploying on heroku.

Your heroku app name

HEROKU_APP_NAME = getenv("HEROKU_APP_NAME")

HEROKU_API_KEY = getenv("HEROKU_API_KEY")

UPSTREAM_REPO = getenv( "UPSTREAM_REPO", "https://github.com/WCGKING/Music Challenger", ) UPSTREAM_BRANCH = getenv("UPSTREAM_BRANCH", "main") GIT_TOKEN = getenv( "GIT_TOKEN", None ) # Fill this variable if your upstream repository is private

SUPPORT_CHANNEL = getenv("SUPPORT_CHANNEL", "https://t.me/friendsquizess") SUPPORT_CHAT = getenv("SUPPORT_CHAT", "https://t.me/FRIENDSGROUPALLINDIA")

Set this to True if you want the assistant to automatically leave chats after an interval

AUTO_LEAVING_ASSISTANT = bool(getenv("AUTO_LEAVING_ASSISTANT", True))

Get this credentials from https://developer.spotify.com/dashboard

SPOTIFY_CLIENT_ID = getenv("SPOTIFY_CLIENT_ID", None) SPOTIFY_CLIENT_SECRET = getenv("SPOTIFY_CLIENT_SECRET", None)

Maximum limit for fetching playlist's track from youtube, spotify, apple links.

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

SONG_DOWNLOAD_DURATION = int(getenv("SONG_DOWNLOAD_DURATION_LIMIT", "180")) SONG_DOWNLOAD_DURATION_LIMIT = int(getenv("SONG_DOWNLOAD_DURATION_LIMIT", "180"))

Telegram audio and video file size limit (in bytes)

TG_AUDIO_FILESIZE_LIMIT = int(getenv("TG_AUDIO_FILESIZE_LIMIT", 104857600)) TG_VIDEO_FILESIZE_LIMIT = int(getenv("TG_VIDEO_FILESIZE_LIMIT", 1073741824))

Checkout https://www.gbmb.org/mb-to-bytes for converting mb to bytes

Get your pyrogram v2 session from @BRANDEDSTRINGSESSION_BOT on Telegram

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)

BANNED_USERS = filters.user() adminlist = {} lyrical = {} votemode = {} autoclean = [] confirmer = {}

START_IMG_URL = getenv( "START_IMG_URL", "https://te.legra.ph/file/5ed99a324f22d636d6305.jpg" ) PING_IMG_URL = getenv( "PING_IMG_URL", "https://te.legra.ph/file/68896b9d5b97252c68f64.jpg" ) PLAYLIST_IMG_URL = "https://te.legra.ph/file/568b292063504617f5adf.jpg" STATS_IMG_URL = "https://te.legra.ph/file/a2939756cee46fcb86e91.jpg" TELEGRAM_AUDIO_URL = "https://te.legra.ph/file/e703dbcf744bda6e6c673.jpg" TELEGRAM_VIDEO_URL = "https://te.legra.ph/file/c28d089437c4be9a2db89.jpg" STREAM_IMG_URL = "https://te.legra.ph/file/68896b9d5b97252c68f64.jpg" SOUNCLOUD_IMG_URL = "https://te.legra.ph/file/879bddbe943cfc1d20cb5.jpg" YOUTUBE_IMG_URL = "https://te.legra.ph/file/ba98bbedea3a7419b0612.jpg" SPOTIFY_ARTIST_IMG_URL = "https://te.legra.ph/file/bce96f5e5d732859675f8.jpg" SPOTIFY_ALBUM_IMG_URL = "https://te.legra.ph/file/ba39a10ba20736f42f202.jpg" SPOTIFY_PLAYLIST_IMG_URL = "https://te.legra.ph/file/568b292063504617f5adf.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://" )

asdzxc12n's Projects

brandedxmention icon brandedxmention

BrandedXMention Bot Can Mention 5K + Members In Telegram Group And Channels Written By Python And Supported Telethon

brandrdxmusic icon brandrdxmusic

ᴅɪꜱᴄᴏᴠᴇʀ ᴛʜᴇ ᴇɴᴄʜᴀɴᴛɪɴɢ ᴡᴏʀʟᴅ ᴏꜰ ᴍᴜꜱɪᴄ ᴡɪᴛʜ ⛦🦋ʙʀᴀɴᴅʀᴅ ❥! ᴛʜɪꜱ ᴘʏᴛʜᴏɴ-ʙᴀꜱᴇᴅ ᴛᴇʟᴇɢʀᴀᴍ ᴍᴜꜱɪᴄ ʙᴏᴛ, ᴘᴏᴡᴇʀᴇᴅ ʙʏ ᴘʏʀᴏɢʀᴀᴍ ᴠ2, ʙʀɪɴɢꜱ ʜᴀʀᴍᴏɴʏ ᴛᴏ ʏᴏᴜʀ ᴄʜᴀᴛꜱ. ᴇɴᴊᴏʏ ꜱᴇᴀᴍʟᴇꜱꜱ ᴍᴜꜱɪᴄ ꜱʜᴀʀɪɴɢ ᴀɴᴅ ꜱᴛʀᴇᴀᴍɪɴɢ ɪɴ ꜱᴛʏʟᴇ.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.