Non-Mandatory Vars
These are the extra vars for extra features inside Music Bot. You can leave non mandatory vars for now and can add them later.
CLEANMODE_MINS
CLEANMODE_MINS-> What is this?
Stranger has a feature called cleanmode. It deletes its old messages after a certain amount of time. You can set that time from here.
Time (in minutes) after which bot will delete its old messages from chats. Default to 5 Mins.
DURATION_LIMIT
DURATION_LIMIT-> What is this?
When a user plays any music from youtube , apple , spotify or any platform , it gets downloaded on the bot. You can restrict users of your bot to play upto a maximum limit of audio duration.
For example : If DURATION_LIMIT is 60 mins, so if a user tries to play a movie of 2-3 hours you're bot won't play that.
Custom max audio(music) duration for voice chat. Default to 60 mins.
PLAYLIST_FETCH_LIMIT
PLAYLIST_FETCH_LIMIT-> What is this?
When a user tries to play playlists, i.e Server Playlist, Youtube Playlist, Apple playlist or Spotify Playlist your bot will fetch only first x number of tracks from the playlist. You can define that x via this var
For example : If PLAYLIST_FETCH_LIMIT is 25, Your bot will play only first 25 tracks of a playlist and will ignore other tracks
Maximum limit for fetching playlist's track from youtube, spotify, apple links. Default to 25 tracks.
SERVER_PLAYLIST_LIMIT
SERVER_PLAYLIST_LIMIT-> What is this?
When someone plays any track from your music bot, it gives an inline button saying add to playlist, so this var bascially restricts the user from saving a limited number of playlist on bot's mongodb server.
For Example: If SERVER_PLAYLIST_LIMITis 25, You're bot wont allow a user to add more than 25 tracks in his playlist.
Maximum Limit Allowed for users to save playlists on bot's server. Default to 30 tracks.
SONG_DOWNLOAD_DURATION_LIMIT
SONG_DOWNLOAD_DURATION_LIMIT-> What is this?
When a user tries to download tracks from your music bot via youtube , this var restricts the user from downloading a song upto a maximum duration limit.
Why this? Some users may try to abuse your bot by downloading 10-15 hour big size files around 10-20gb on your bot making it slow eventually.
Duration Limit for downloading Songs in MP3 or MP4 format from bot. Default to 180 mins.
SUPPORT_CHANNEL & SUPPORT_GROUP
SUPPORT_CHANNEL & SUPPORT_GROUP-> What is this?
If you have a Support for your Music Bot, You can set this var. Only Links formats can be accepted for this Var value.
Don’t use @
If you've any channel or group for your music bot , fill it with your channel link
VIDEO_STREAM_LIMIT
VIDEO_STREAM_LIMIT-> What is this?
You can allow a limited number of video calls on your music bot. Each video call consumes some cpu , to prevent cpu overload issues. As soon the limit exceeds your bot will send a pop up to the user for switching play mode to audio.
Maximum number of video calls allowed on bot. You can later set it via /
set_video_limiton telegram. Default to 3 chats.
Bot Vars
These are the extra vars for extra features inside Music Bot. You can leave non mandatory vars for now and can add them later.
AUTO_LEAVING_ASSISTANT
AUTO_LEAVING_ASSISTANT-> What is this?
Stranger has a feature called auto assistant leaving.
It leaves assistant accounts from all chats after a certain amount of time. You can set that time via
ASSISTANT_LEAVE_TIMEYou can use this mode, it enhances your bot's performance
Set it in True if you want to leave your assistant after a certain amount of time.. Default to False.
ASSISTANT_LEAVE_TIME
ASSISTANT_LEAVE_TIMETime after which your assistant account will leave served chats automatically. Default to 5400 seconds, i.e 90 Mins
AUTO_SUGGESTION_MODE
AUTO_SUGGESTION_MODE-> What is this?
This feature sends a randomly message to 1/10 of your served chats of the bot regarding bot commands .Helps users in knowing more about your bot.
For example: If your bot works in 200 chats, this mode will send bot commands suggestion after a certain amount of time to 20 chats randomly. You can set that time via AUTO_SUGGESTION_TIME
set it True if you want your bot to suggest about bot's commands to random chats of your bots.. Default to False.
AUTO_SUGGESTION_TIME
AUTO_SUGGESTION_TIMETime after which your bot will suggest bot's commands. Default to 5400 seconds, i.e 90 Mins
AUTO_DOWNLOADS_CLEAR
AUTO_DOWNLOADS_CLEAR-> What is this?
Every file played on your music bot gets downloaded first and then gets played on voice chat. This sometime fills the storage of your cloud hosting and makes bot dead.
To counter this issue, we made auto downloads clear mode . This mode clears all the downloaded files for the particular track soon as a track gets finished playing .
Set it True if you want to delete downloads after the music playout ends.. Default to False.
PRIVATE_BOT_MODE
PRIVATE_BOT_MODE-> What is this?
Want your bot to be restricted for other chats?
No one can add your bot without your permission in this mode. You can allow particular chats for which you want your bot to work. Others wont be able to use your bot.
/authorize - For allowing any chat
/unauthorize - For dis-allowing any chat
Set it true if you want your bot to be private only or False for all groups. Default to False.
TELEGRAM_EDIT_SLEEP & YOUTUBE_EDIT_SLEEP
TELEGRAM_EDIT_SLEEP & YOUTUBE_EDIT_SLEEP-> What is this?
Stranger has media downloader progress bar, which shows how much file has been downloaded after a certain amount of time. That certain amount of time can be set via these vars
For example: If someone plays telegram video from your bot, it will first download that media from telegram and will show the user that how much it has downloaded after every 6-7 seconds.
Time(in seconds) sleep duration.
Default to 3 seconds for Youtube Downloader and 5 seconds for Telegram Downloader
Heroku Vars
These are the minimum required vars need to setup HEROKU.
These two vars are essential for Heroku Updater to work. By setting these two vars you can get logs of your heroku app, set var, edit var, delete vars , check dyno usage and update bot.
These two vars are not Mandatory! You can leave them blank too.
HEROKU_API_KEY
HEROKU_API_KEYTo work some Heroku compatible modules, this var value required to Access your account to use `get_log`, `usage`, `update` etc etc commands.
You can fill this var using your API key or Authorization token.
You can get this value from: Heroku Account

HEROKU_APP_NAME
HEROKU_APP_NAMEYou have to Enter the app name which you gave to identify your Music Bot in Heroku.
Size Vars
These are the minimum required vars need to setup HEROKU.
Maximum File size limit for the audio and videos that a user can play from your bot. [Only Bytes Size Accepted]
You can convert mb into bytes from https://www.gbmb.org/mb-to-bytes and use it here
TG_AUDIO_FILESIZE_LIMIT
TG_AUDIO_FILESIZE_LIMITMaximum file size limit for audio files which can be streamed over vc. Defaults to 104857600 bytes, i.e. 100MB
TG_VIDEO_FILESIZE_LIMIT
TG_VIDEO_FILESIZE_LIMITMaximum file size limit for video files which can be played. Defaults to 1073741824 bytes, i.e. 1024MB or 1GB
Spotify Vars
These are the minimum required vars need to setup Spotify Playing.
SPOTIFY_CLIENT_ID & SPOTIFY_CLIENT_SECRET
SPOTIFY_CLIENT_ID & SPOTIFY_CLIENT_SECRETThese vars will be required to setup spotify play
click here to know to get these var
Multi-Assistant Vars
These are the minimum required vars need to setup Multi-Assistant Mode
What is Multi-Assistant Mode?
One Telegram Account can join upto 500 chats. If your bot is running in higher number of chats it will create a problem for assistant to join and leave chat everytime giving invite link exportation floods too
You can use upto 5 Assistant Clients ( allowing your bot to atleast work in 2000-2500 chats at a time )
Setting STRING_SESSION is mandatory and rest if you want multi-assistant mode you can set else leave blank.
STRING_SESSION2
STRING_SESSION2STRING_SESSION3
STRING_SESSION3STRING_SESSION4
STRING_SESSION4STRING_SESSION5
STRING_SESSION5 Custom Repo Vars
If you plan to use Stranger Music Bot with your own customized or modified code.
If you plan to use Stranger Music Bot with your own customized or modified code, you must fill your own Forked StrangerMusicBot Repository URL in UPSTREAM_REPO Var value and the branch name in UPSTREAM_BRANCH var value
UPSTREAM_REPO
UPSTREAM_REPOYour Upstream Repo URL or Forked Repo HERE. If You're Beginner, Don't Play with This.
UPSTREAM_BRANCH
UPSTREAM_BRANCHDefault Branch of your Upstream Repo URL or Forked Repo HERE.
GIT_TOKEN
GIT_TOKENYour GIT TOKEN if your upstream repo is private
GITHUB_REPO
GITHUB_REPOYour Github Repo url, that will be shown on /start command
Images Vars
You can change images which are used in Stranger Music Bot.
Use Telegraph links for all these vars.
START_IMG_URL: Image which comes on /start command in private messages of bot.PING_IMG_URL: Image which comes on /ping command of bot.PLAYLIST_IMG_URL: Image which comes on /play command of bot.GLOBAL_IMG_URL: Image which comes on /stats command of bot.STATS_IMG_URL: Image which comes on /stats command of bot.TELEGRAM_AUDIO_URL: This image comes when someone plays audios from telegram.TELEGRAM_VIDEO_URL: This image comes when someone plays videos from telegram.STREAM_IMG_URL: his image comes when someone plays m3u8 or index links.SOUNCLOUD_IMG_URL: This image comes when someone plays music from soundcloud.YOUTUBE_IMG_URL: This image comes if thumbnail generator fails to gen thumb anyhow.SPOTIFY_ARTIST_IMG_URL: This image comes when someone plays Spotify artist via link in inline mode.SPOTIFY_ALBUM_IMG_URL: This image comes when someone plays Spotify album via link in inline mode.SPOTIFY_PLAYLIST_IMG_URL: This image comes when someone plays Spotify album via link in inline mode.
Last updated