Created
December 30, 2017 03:41
-
-
Save Snow-Pyon/2e2b1ff0f7480c47d91c62bccab94fd0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on script load: | |
import "com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeAudioSourceManager" | |
import "com.sedmelluq.discord.lavaplayer.source.youtube.YoutubeSearchProvider" | |
import "ch.njol.skript.variables.Variables" | |
set {_yt-audio-manager} to new {YoutubeAudioSourceManager}(true) | |
set {kurisu::instances::yt-search-provider} to new YoutubeSearchProvider({_yt-audio-manager}) | |
effect search (youtube|yt)track %string% and store results in [list] {<(.+)>::*}: | |
set {_query} to expression-1 | |
set {_result} to {kurisu::instances::yt-search-provider}.loadSearchResult({_query}) | |
set {_tracks::*} to ...{_result}.getTracks() | |
loop {_tracks::*}: | |
{Variables}.setVariable("%regex-1%::%loop-value.getIdentifier()%", event and whether regex-1 starts with "_".); | |
# TODO: SoundCloud search |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment