ShadowsNemesis

Bdfd music tutorial and commands - Shadow

Feb 20th, 2022
3,232
4
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 8.81 KB | None | 4 0
  1. __**Music on BDFD codes updated and fixed**__
  2. 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:
  3.  
  4. __Variable:__ Music
  5. __Value:__ http://your repl url:80
  6.  
  7. __Variable:__ Track
  8. __Value:__ 0
  9.  
  10. __Variable:__ musiclist
  11. __Value:__
  12.  
  13. __Variable:__ songsearch
  14. __Value:__
  15.  
  16. ================
  17. First follow these steps, do not type bash run.sh instead press the green play button
  18.  
  19. https://cdn.discordapp.com/attachments/878965516885192724/943948854359887972/video.mov
  20. ==============
  21. 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
  22. https://cdn.discordapp.com/attachments/849937806259650590/944829696586174474/unknown.png
  23. ================
  24. __**MUSIC Commands**__
  25. All codes are **BDSCRIPT2**
  26.  
  27. __Join__
  28. (Prefix)joinvc
  29. `
  30. $onlyIf[$guildID!=;]
  31. $alternativeParsing
  32. $httpAddHeader[Authorization;lava123]
  33. $httpAddHeader[port;80]
  34. $onlyBotPerms[connect;:x: Missing `connect` permission]
  35. $onlyBotPerms[speak;:x: Missing `speak` permission]
  36.  
  37. $varExistError[Music;Create a variable in the app named ` Music ` and put your Replit link as value]
  38. $varExistError[Track;Create a variable in the app named ` Track ` and put 0 as value]
  39.  
  40. $httpGet[$getVar[Music]/voice_channel_id/$guildID/$authorID]
  41. $var[chan;$httpResult[voice_id]]
  42.  
  43. $httpPost[$getVar[Music]/join_voice_channel;{"id":"$httpResult[voice_id]"}]
  44.  
  45. $onlyIf[$httpResult[voice_id]!=;you are not connected to a voice channel]
  46. $sendMessage[Joining <#$var[chan]>, lets get some music playing]
  47. `
  48. __Play song / join and play__
  49. (Prefix)play
  50. `
  51.  
  52. $nomention
  53.  
  54. $onlyIf[$guildID!=;]
  55. $alternativeParsing
  56.  
  57.  
  58. $onlyBotPerms[connect;:x: Missing `connect` permission]
  59. $onlyBotPerms[speak;:x: Missing `speak` permission]
  60.  
  61. $varExistError[Music;Create a variable in the app named ` Music ` and put your Replit link as value]
  62. $varExistError[Track;Create a variable in the app named ` Track ` and put 0 as value]
  63. $if[$message!=]
  64. $argsCheck[>1;Type a song to play]
  65. $httpGet[$getVar[Music]/voice_channel_id/$guildID/$authorID]
  66. $onlyIf[$httpResult[voice_id]!=;You are not connected to any voice channel]
  67. $httpPost[$getVar[Music]/join_voice_channel;{"id":"$httpResult[voice_id]"}]
  68.  
  69. $httpPost[$getVar[Music]/search_and_play/$guildID?q=$url[encode;$message];{}]
  70. $httpGet[$getVar[Music]/track_info/$guildID]
  71. $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]
  72. $else
  73. $httpAddHeader[Authorization;lava123]
  74. $httpGet[$getVar[Music]/track_info/$guildID]
  75. $httpPost[$getVar[Music]/search_and_play/$guildID?q=$url[encode;$httpResult[url]];{}]
  76. $httpGet[$getVar[Music]/track_info/$guildID]
  77. $sendEmbedMessage[$channelID;;$httpResult[title];$httpResult[url];Author-$httpResult[author];1700fb;Currently playing:;;;;;$replaceText[$httpResult[thumbnail];2048.jpg;maxresdefault.jpg;1];yes;no]
  78. $endif
  79. `
  80. __Skip song__
  81. (Prefix)skip
  82. `
  83. $nomention
  84.  
  85. $httpGet[$getVar[Music]/voice_channel_id/$guildID/$authorID]
  86. $var[authorvc;$httpResult[voice_id]]
  87. $onlyIf[$httpResult[voice_id]!=;Please join the same VC as me first.]
  88.  
  89. $httpGet[$getVar[Music]/voice_channel_id/$guildID/$botID]
  90. $color[#1ED761]
  91.  $if[$httpResult[voice_id]==]
  92. $description[I'm not in any Voice Channel!]
  93.  $else
  94. $httpPost[$getVar[Music]/skip/$guildID;{}]
  95.    $if[$httpResult=={"type":"SUCCESS"}]
  96. $description[Successfully skipped the song!]
  97.    $else
  98. $description[Successfully actioned the command.]
  99.    $endif
  100.  $endif
  101. $footer[Requested by $username[$authorID]#$discriminator[$authorID]]
  102. $addTimestamp
  103. `
  104. __Now Playing__
  105. (Prefix)nowplaying
  106. `
  107. $nomention
  108. $httpAddHeader[Authorization;lava123]
  109. $httpGet[$getVar[Music]/track_info/$guildID]
  110.  
  111. $author[Playing Now!]
  112. $title[$httpResult[title]]
  113. $embeddedURL[$httpResult[url]]
  114. $addField[Author;$httpResult[author].;yes]
  115. $addField[Streaming; $httpResult[isStream].;yes]
  116. $if[$httpResult[duration]!=]
  117. $var[Secs;$divide[$replaceText[$httpResult[duration];.000000;1];1000]]
  118. $var[Mins;$divide[$var[Secs];60]]
  119. $var[Sec;$calculate[$var[Secs]-($var[Mins]*60)]]
  120. $if[$var[Sec]<10]
  121.   $var[S;$var[Sec]]
  122.     $else $var[S;$var[Sec]]
  123.       $endif
  124. $if[$var[Mins]<10]
  125.   $var[M;$var[Mins]]
  126.     $else $var[M;$var[Mins]]
  127.       $endif
  128.       $endif
  129. $addField[Duration; $var[M] Minutes $var[S] Seconds;yes]
  130. $image[$replaceText[$httpResult[thumbnail];2048.jpg;maxresdefault.jpg]]
  131. $color[1700fb]
  132. $footer[#$channelName[$channelID] | $username#$discriminator[]]
  133. $footerIcon[$authorAvatar]
  134. $setServerVar[Track;1]
  135. `
  136. __Volume__
  137. (Prefix)volume
  138. `
  139. $nomention
  140. $ignoreTriggerCase
  141. $alternativeParsing
  142. $argsCheck[1;]
  143.  
  144. $httpAddHeader[Authorization;lava123]
  145. $httpAddHeader[port;80]
  146. $onlyIf[$guildID!=;]
  147. $onlyIf[$and[$isNumber[$message]==true;$message<201;$message>=0]==true;Type a valid number between 0-200]
  148.  
  149. $httpGet[$getVar[Music]/voice_channel_id/$guildID/$botID]
  150. $var[BotVC;$httpResult[voice_id]]
  151. $onlyIf[$var[BotVC]!=;Currently i am not in any voice channels]
  152. $httpGet[$getVar[Music]/voice_channel_id/$guildID/$authorID]
  153. $onlyIf[$optOff[$httpResult[voice_id]]!=;You are not connected to any voice channel]
  154. $onlyIf[$optOff[$httpResult[voice_id]]==$var[BotVC];You need to be in the same voice channel]
  155. $httpPost[$getVar[Music]/volume/$guildID;{"volume":$message}]
  156.  
  157. $sendMessage[Successfully changed the track volume ]
  158. `
  159. __Song Search__
  160. Code 1: (prefix)songsearch
  161. `
  162.  
  163. $httpGet[$getVar[Music]/search?q=$replaceText[$message; ;+;-1]]
  164. $title[__**$httpResult[loadType]**__]
  165. $description[__**Remember: DO NOT choose any option that is a video!!**__
  166.  
  167. 1. $httpResult[tracks;0;title]
  168.  
  169. 2. $httpResult[tracks;1;title]
  170.  
  171. 3. $httpResult[tracks;2;title]
  172.  
  173. 4. $httpResult[tracks;3;title]
  174.  
  175. 5. $httpResult[tracks;4;title]
  176.  
  177. 6. $httpResult[tracks;5;title]
  178.  
  179. 7. $httpResult[tracks;6;title]
  180.  
  181. 8. $httpResult[tracks;7;title]
  182.  
  183. 9. $httpResult[tracks;8;title]
  184.  
  185. 10. $httpResult[tracks;9;title]]
  186. $nomention
  187. $color[1700fb]
  188. $awaitFunc[songselect;$authorID]
  189. $footer[Type the number of the song you wish to play, or cancel]
  190. $setUserVar[songsearch;$replaceText[$message; ;+;-1];$authorID]
  191. `
  192. Code 2: $awaitedCommand[songselect;]
  193. `
  194. $deletecommand
  195. $if[$message!=cancel]
  196. $clear[1]
  197. $httpGet[$getVar[Music]/search?q=$getUserVar[songsearch;$authorID]]
  198. $setUserVar[Track;$httpResult[tracks;$sub[$message;1];track];$authorID]
  199.  
  200. $replyIn[1]
  201. $httpPost[$getVar[Music]/play/$guildID;{"track":"$url[encode;$getUserVar[Track;$authorID]]"}]
  202. $description[Selection: $httpResult[tracks;$sub[$message;1];title] $if[$httpResult[playing_now]==true] Now Playing $else Added to queue $endif ]
  203. $else
  204. $description[Have a great day!]
  205. $deleteIn[10]
  206. $color[1700fb]
  207. $endif
  208. $nomention
  209. `
  210. __Music Queue__
  211. (Prefix)queued
  212. `
  213. $nomention
  214. $deletecommand
  215. $sendMessage[`gathering song queue...`]
  216. $ignoreTriggerCase
  217.  
  218. $alternativeParsing
  219. $botTyping
  220. $httpAddHeader[Authorization;lava123]
  221. $httpAddHeader[port;80]
  222.  
  223. $async[a]
  224. $httpGet[$getVar[Music]/track_info/$guildID]
  225. $setServerVar[musiclist;$getServerVar[musiclist]$replaceText[$httpResult[title];|;;-1]|$httpResult[url]|]
  226. $endasync
  227. $async[b]
  228. $replyIn[1]
  229. $httpGet[$getVar[Music]/track_info/$guildID?offset=2]
  230. $setServerVar[musiclist;$getServerVar[musiclist]$replaceText[$httpResult[title];|;;-1]|$httpResult[url]|]
  231. $endasync
  232. $async[c]
  233. $replyIn[2]
  234. $httpGet[$getVar[Music]/track_info/$guildID?offset=3]
  235. $setServerVar[musiclist;$getServerVar[musiclist]$replaceText[$httpResult[title];|;;-1]|$httpResult[url]|]
  236. $endasync
  237. $async[d]
  238. $replyIn[3]
  239. $httpGet[$getVar[Music]/track_info/$guildID?offset=4]
  240. $setServerVar[musiclist;$getServerVar[musiclist]$replaceText[$httpResult[title];|;;-1]|$httpResult[url]|]
  241. $endasync
  242.  
  243. $replyIn[4]
  244. $clear[1]
  245. $textSplit[$getServerVar[musiclist];|]
  246.  
  247. $description[__Playing Now:__]
  248. $addField[Track 1:;
  249. $if[$splitText[1]!=][$splitText[1]\]($splitText[2]) $else Empty $endif ]
  250. $addField[Track 2:;
  251. $if[$splitText[3]!=]  [$splitText[3]\]($splitText[4])  $else Empty $endif ]
  252. $addField[Track 3:;
  253. $if[$splitText[5]!=] [$splitText[5]\]($splitText[6])  $else Empty $endif ]
  254. $addField[Track 4:;
  255. $if[$splitText[7]!=] [$splitText[7]\]($splitText[8])  $else Empty $endif
  256. ]
  257. $color[1700fb]
  258.  
  259. $addTimestamp
  260. $author[Queue]
  261.  
  262. $async[f]
  263. $replyIn[5]
  264. $setServerVar[musiclist;]
  265. $endasync
  266. `
  267.  
  268. https://cdn.discordapp.com/attachments/849937806259650590/944828231440273428/unknown.png
  269.  
  270. https://cdn.discordapp.com/attachments/849937806259650590/944828335463202867/IMG_1861.mov
  271.  
  272. https://cdn.discordapp.com/attachments/849937806259650590/944828303003508766/IMG_1862.png
  273.  
  274. https://cdn.discordapp.com/attachments/849937806259650590/944833939103678504/unknown.png
  275.  
  276. https://cdn.discordapp.com/attachments/849937806259650590/944833861295145000/unknown.png
Advertisement
Add Comment
Please, Sign In to add comment