Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- __**Music on BDFD codes updated and fixed**__
- Credit to Berk and his team for the original replit to make this happen, and credit to priyanju09 Whos codes these are based from. To start Make these variables:
- __Variable:__ Music
- __Value:__ http://your repl url:80
- __Variable:__ Track
- __Value:__ 0
- __Variable:__ musiclist
- __Value:__
- __Variable:__ songsearch
- __Value:__
- ================
- First follow these steps, do not type bash run.sh instead press the green play button
- https://cdn.discordapp.com/attachments/878965516885192724/943948854359887972/video.mov
- ==============
- Your replit must show `cannot GET` in order for it to work. If it doesn’t just stop the replit and rerun. If it keeps not doing it you will need to refork and start over
- https://cdn.discordapp.com/attachments/849937806259650590/944829696586174474/unknown.png
- ================
- __**MUSIC Commands**__
- All codes are **BDSCRIPT2**
- __Join__
- (Prefix)joinvc
- `
- $onlyIf[$guildID!=;]
- $alternativeParsing
- $httpAddHeader[Authorization;lava123]
- $httpAddHeader[port;80]
- $onlyBotPerms[connect;:x: Missing `connect` permission]
- $onlyBotPerms[speak;:x: Missing `speak` permission]
- $varExistError[Music;Create a variable in the app named ` Music ` and put your Replit link as value]
- $varExistError[Track;Create a variable in the app named ` Track ` and put 0 as value]
- $httpGet[$getVar[Music]/voice_channel_id/$guildID/$authorID]
- $var[chan;$httpResult[voice_id]]
- $httpPost[$getVar[Music]/join_voice_channel;{"id":"$httpResult[voice_id]"}]
- $onlyIf[$httpResult[voice_id]!=;you are not connected to a voice channel]
- $sendMessage[Joining <#$var[chan]>, lets get some music playing]
- `
- __Play song / join and play__
- (Prefix)play
- `
- $nomention
- $onlyIf[$guildID!=;]
- $alternativeParsing
- $onlyBotPerms[connect;:x: Missing `connect` permission]
- $onlyBotPerms[speak;:x: Missing `speak` permission]
- $varExistError[Music;Create a variable in the app named ` Music ` and put your Replit link as value]
- $varExistError[Track;Create a variable in the app named ` Track ` and put 0 as value]
- $if[$message!=]
- $argsCheck[>1;Type a song to play]
- $httpGet[$getVar[Music]/voice_channel_id/$guildID/$authorID]
- $onlyIf[$httpResult[voice_id]!=;You are not connected to any voice channel]
- $httpPost[$getVar[Music]/join_voice_channel;{"id":"$httpResult[voice_id]"}]
- $httpPost[$getVar[Music]/search_and_play/$guildID?q=$url[encode;$message];{}]
- $httpGet[$getVar[Music]/track_info/$guildID]
- $sendEmbedMessage[$channelID;;$httpResult[title];$httpResult[url];Author -$httpResult[author];1700fb;Song Has been added, Currently playing:;;;;;$replaceText[$httpResult[thumbnail];2048.jpg;maxresdefault.jpg;1];yes;no]
- $else
- $httpAddHeader[Authorization;lava123]
- $httpGet[$getVar[Music]/track_info/$guildID]
- $httpPost[$getVar[Music]/search_and_play/$guildID?q=$url[encode;$httpResult[url]];{}]
- $httpGet[$getVar[Music]/track_info/$guildID]
- $sendEmbedMessage[$channelID;;$httpResult[title];$httpResult[url];Author-$httpResult[author];1700fb;Currently playing:;;;;;$replaceText[$httpResult[thumbnail];2048.jpg;maxresdefault.jpg;1];yes;no]
- $endif
- `
- __Skip song__
- (Prefix)skip
- `
- $nomention
- $httpGet[$getVar[Music]/voice_channel_id/$guildID/$authorID]
- $var[authorvc;$httpResult[voice_id]]
- $onlyIf[$httpResult[voice_id]!=;Please join the same VC as me first.]
- $httpGet[$getVar[Music]/voice_channel_id/$guildID/$botID]
- $color[#1ED761]
- $if[$httpResult[voice_id]==]
- $description[I'm not in any Voice Channel!]
- $else
- $httpPost[$getVar[Music]/skip/$guildID;{}]
- $if[$httpResult=={"type":"SUCCESS"}]
- $description[Successfully skipped the song!]
- $else
- $description[Successfully actioned the command.]
- $endif
- $endif
- $footer[Requested by $username[$authorID]#$discriminator[$authorID]]
- $addTimestamp
- `
- __Now Playing__
- (Prefix)nowplaying
- `
- $nomention
- $httpAddHeader[Authorization;lava123]
- $httpGet[$getVar[Music]/track_info/$guildID]
- $author[Playing Now!]
- $title[$httpResult[title]]
- $embeddedURL[$httpResult[url]]
- $addField[Author;$httpResult[author].;yes]
- $addField[Streaming; $httpResult[isStream].;yes]
- $if[$httpResult[duration]!=]
- $var[Secs;$divide[$replaceText[$httpResult[duration];.000000;1];1000]]
- $var[Mins;$divide[$var[Secs];60]]
- $var[Sec;$calculate[$var[Secs]-($var[Mins]*60)]]
- $if[$var[Sec]<10]
- $var[S;$var[Sec]]
- $else $var[S;$var[Sec]]
- $endif
- $if[$var[Mins]<10]
- $var[M;$var[Mins]]
- $else $var[M;$var[Mins]]
- $endif
- $endif
- $addField[Duration; $var[M] Minutes $var[S] Seconds;yes]
- $image[$replaceText[$httpResult[thumbnail];2048.jpg;maxresdefault.jpg]]
- $color[1700fb]
- $footer[#$channelName[$channelID] | $username#$discriminator[]]
- $footerIcon[$authorAvatar]
- $setServerVar[Track;1]
- `
- __Volume__
- (Prefix)volume
- `
- $nomention
- $ignoreTriggerCase
- $alternativeParsing
- $argsCheck[1;]
- $httpAddHeader[Authorization;lava123]
- $httpAddHeader[port;80]
- $onlyIf[$guildID!=;]
- $onlyIf[$and[$isNumber[$message]==true;$message<201;$message>=0]==true;Type a valid number between 0-200]
- $httpGet[$getVar[Music]/voice_channel_id/$guildID/$botID]
- $var[BotVC;$httpResult[voice_id]]
- $onlyIf[$var[BotVC]!=;Currently i am not in any voice channels]
- $httpGet[$getVar[Music]/voice_channel_id/$guildID/$authorID]
- $onlyIf[$optOff[$httpResult[voice_id]]!=;You are not connected to any voice channel]
- $onlyIf[$optOff[$httpResult[voice_id]]==$var[BotVC];You need to be in the same voice channel]
- $httpPost[$getVar[Music]/volume/$guildID;{"volume":$message}]
- $sendMessage[Successfully changed the track volume ]
- `
- __Song Search__
- Code 1: (prefix)songsearch
- `
- $httpGet[$getVar[Music]/search?q=$replaceText[$message; ;+;-1]]
- $title[__**$httpResult[loadType]**__]
- $description[__**Remember: DO NOT choose any option that is a video!!**__
- 1. $httpResult[tracks;0;title]
- 2. $httpResult[tracks;1;title]
- 3. $httpResult[tracks;2;title]
- 4. $httpResult[tracks;3;title]
- 5. $httpResult[tracks;4;title]
- 6. $httpResult[tracks;5;title]
- 7. $httpResult[tracks;6;title]
- 8. $httpResult[tracks;7;title]
- 9. $httpResult[tracks;8;title]
- 10. $httpResult[tracks;9;title]]
- $nomention
- $color[1700fb]
- $awaitFunc[songselect;$authorID]
- $footer[Type the number of the song you wish to play, or cancel]
- $setUserVar[songsearch;$replaceText[$message; ;+;-1];$authorID]
- `
- Code 2: $awaitedCommand[songselect;]
- `
- $deletecommand
- $if[$message!=cancel]
- $clear[1]
- $httpGet[$getVar[Music]/search?q=$getUserVar[songsearch;$authorID]]
- $setUserVar[Track;$httpResult[tracks;$sub[$message;1];track];$authorID]
- $replyIn[1]
- $httpPost[$getVar[Music]/play/$guildID;{"track":"$url[encode;$getUserVar[Track;$authorID]]"}]
- $description[Selection: $httpResult[tracks;$sub[$message;1];title] $if[$httpResult[playing_now]==true] Now Playing $else Added to queue $endif ]
- $else
- $description[Have a great day!]
- $deleteIn[10]
- $color[1700fb]
- $endif
- $nomention
- `
- __Music Queue__
- (Prefix)queued
- `
- $nomention
- $deletecommand
- $sendMessage[`gathering song queue...`]
- $ignoreTriggerCase
- $alternativeParsing
- $botTyping
- $httpAddHeader[Authorization;lava123]
- $httpAddHeader[port;80]
- $async[a]
- $httpGet[$getVar[Music]/track_info/$guildID]
- $setServerVar[musiclist;$getServerVar[musiclist]$replaceText[$httpResult[title];|;;-1]|$httpResult[url]|]
- $endasync
- $async[b]
- $replyIn[1]
- $httpGet[$getVar[Music]/track_info/$guildID?offset=2]
- $setServerVar[musiclist;$getServerVar[musiclist]$replaceText[$httpResult[title];|;;-1]|$httpResult[url]|]
- $endasync
- $async[c]
- $replyIn[2]
- $httpGet[$getVar[Music]/track_info/$guildID?offset=3]
- $setServerVar[musiclist;$getServerVar[musiclist]$replaceText[$httpResult[title];|;;-1]|$httpResult[url]|]
- $endasync
- $async[d]
- $replyIn[3]
- $httpGet[$getVar[Music]/track_info/$guildID?offset=4]
- $setServerVar[musiclist;$getServerVar[musiclist]$replaceText[$httpResult[title];|;;-1]|$httpResult[url]|]
- $endasync
- $replyIn[4]
- $clear[1]
- $textSplit[$getServerVar[musiclist];|]
- $description[__Playing Now:__]
- $addField[Track 1:;
- $if[$splitText[1]!=][$splitText[1]\]($splitText[2]) $else Empty $endif ]
- $addField[Track 2:;
- $if[$splitText[3]!=] [$splitText[3]\]($splitText[4]) $else Empty $endif ]
- $addField[Track 3:;
- $if[$splitText[5]!=] [$splitText[5]\]($splitText[6]) $else Empty $endif ]
- $addField[Track 4:;
- $if[$splitText[7]!=] [$splitText[7]\]($splitText[8]) $else Empty $endif
- ]
- $color[1700fb]
- $addTimestamp
- $author[Queue]
- $async[f]
- $replyIn[5]
- $setServerVar[musiclist;]
- $endasync
- `
- https://cdn.discordapp.com/attachments/849937806259650590/944828231440273428/unknown.png
- https://cdn.discordapp.com/attachments/849937806259650590/944828335463202867/IMG_1861.mov
- https://cdn.discordapp.com/attachments/849937806259650590/944828303003508766/IMG_1862.png
- https://cdn.discordapp.com/attachments/849937806259650590/944833939103678504/unknown.png
- https://cdn.discordapp.com/attachments/849937806259650590/944833861295145000/unknown.png
Advertisement
Add Comment
Please, Sign In to add comment