示例#1
0
 public MusicService(DiscordSocketClient client, LavaRestClient lavaRestClient, LavaSocketClient lavaSocketClient)
 {
     _client                     = client;
     _lavaRestClient             = lavaRestClient;
     _lavaSocketClient           = lavaSocketClient;
     MusicService.lavaRestClient = lavaRestClient;
 }
示例#2
0
 public MusicService(LavaRestClient lavaRestClient, DiscordSocketClient discordSocketClient,
                     LavaSocketClient lavaSocketClient)
 {
     client = discordSocketClient;
     this.lavaRestClient   = lavaRestClient;
     this.lavaSocketClient = lavaSocketClient;
 }
示例#3
0
 public SpotifyRunConfig(LavaRestClient lavaRest, SpotifyWebAPI api, SpotifyConfig config, SpotifyTrackConverter trackConverter)
 {
     this.LavaRest       = lavaRest;
     this.Api            = api;
     this.Config         = config;
     this.TrackConverter = trackConverter;
 }
示例#4
0
 public MusicHandler(LavaRestClient lavaRestClient, LavaSocketClient lavaSocketClient, DiscordSocketClient client, IDiscordLogger logger)
 {
     _lavaRestClient   = lavaRestClient ?? throw new ArgumentNullException(nameof(lavaRestClient));
     _lavaSocketClient = lavaSocketClient ?? throw new ArgumentNullException(nameof(lavaSocketClient));
     _client           = client ?? throw new ArgumentNullException(nameof(client));
     _logger           = logger ?? throw new ArgumentNullException(nameof(logger));
 }
示例#5
0
 public MusicService(LavaRestClient lavaRestClient,
                     LavaSocketClient lavaSocketClient, Interfaces.IDiscordClient client)
 {
     _lavaRestClient   = lavaRestClient;
     _lavaSocketClient = lavaSocketClient;
     _client           = client.Client;
     InitializeAsync();
 }
 public MusicService(LavaRestClient lavaRestClient, DiscordSocketClient client,
                     LavaSocketClient lavaSocketClient, LogService logService)
 {
     _client           = client;
     _lavaRestClient   = lavaRestClient;
     _lavaSocketClient = lavaSocketClient;
     _logService       = logService;
 }
示例#7
0
 public AudioService(DiscordSocketClient client)
 {
     _client         = client;
     _lavaRestClient = new LavaRestClient();
     _lavaClient     = new LavaSocketClient();
     _queues         = new Dictionary <ulong, Queue <IPlayable> >();
     _client.Ready  += OnReady;
 }
示例#8
0
 public Audio(VictoriaService vic, LogHandler logger, HelpService helpService, LocalManagementService local)
 {
     Vic             = vic;
     Logger          = logger;
     HelpService     = helpService;
     Local           = local;
     RestClient      = vic.RestClient;
     LavaShardClient = vic.Client;
 }
示例#9
0
 public DiscordEventHandler(DiscordShardedClient client, CommandHandler commandHandler
                            , ServerActivityLogger serverActivityLogger, WasagotchiTimer wasagotchiTimer, Events events, MessageRewardHandler messageRewardHandler, MusicService musicService, LavaShardClient lavaShardClient, LavaRestClient lavaRestClient)
 {
     _client               = client;
     _commandHandler       = commandHandler;
     _serverActivityLogger = serverActivityLogger;
     _wasagotchiTimer      = wasagotchiTimer;
     _events               = events;
     _messageRewardHandler = messageRewardHandler;
     _musicService         = musicService;
     _lavaShardClient      = lavaShardClient;
     _lavaRestClient       = lavaRestClient;
 }
示例#10
0
        public SpotifyHandlerService(EnergizeClient client)
        {
            this.Logger = client.Logger;
            this.Api    = new SpotifyWebAPI
            {
                TokenType    = "Bearer",
                UseAuth      = true,
                UseAutoRetry = true
            };
            this.LavaRest = GetLavaRestClient();
            // TODO: add configuration entry
            this.Config           = Essentials.Config.Instance.Spotify;
            this.SpotifyAuthTimer = new Timer(this.TradeSpotifyToken);

            SpotifyRunConfig spotifyRunConfig = new SpotifyRunConfig(this.LavaRest, this.Api, this.Config, new SpotifyTrackConverter(this.LavaRest, this.Config));

            this.TrackProvider    = new SpotifyTrackProvider(spotifyRunConfig);
            this.SearchProvider   = new SpotifySearchProvider(spotifyRunConfig);
            this.PlaylistProvider = new SpotifyPlaylistProvider(spotifyRunConfig);
            this.AlbumProvider    = new SpotifyAlbumProvider(spotifyRunConfig);
            this.ArtistProvider   = new SpotifyArtistProvider(spotifyRunConfig);
        }
示例#11
0
 public AudioSearchModule(LavaSocketClient lavaSocketClient, LavaRestClient lavaRestClient, TrackHandler trackHandler)
 {
     _lavaSocketClient = lavaSocketClient;
     _lavaRestClient   = lavaRestClient;
     _trackHandler     = trackHandler;
 }
示例#12
0
        public override async Task Do(SearchArgs args)
        {
            var searchResult = await LavaRestClient.SearchSoundcloud(args.Query);

            await HandleSearchResult(searchResult);
        }
示例#13
0
 public AudioService(LavaRestClient lavaRestClient, DiscordSocketClient client, LavaSocketClient lavaSocketClient)
 {
     _client           = client;
     _lavaRestClient   = lavaRestClient;
     _lavaSocketClient = lavaSocketClient;
 }
示例#14
0
 public AudioService(LavaSocketClient lavaSocketClient, LavaRestClient lavaRestClient)
 {
     _lavaSocketClient = lavaSocketClient;
     _lavaRestClient   = lavaRestClient;
 }
示例#15
0
 public AudioModule(LavaSocketClient lavaSocketClient, LavaRestClient lavaRestClient, DatabaseHandler databaseHandler)
 {
     _lavaSocketClient = lavaSocketClient;
     _lavaRestClient   = lavaRestClient;
     _databaseHandler  = databaseHandler;
 }
示例#16
0
 public AudioService(LavaSocketClient _lavaSocketClient, LavaRestClient _lavaRestClient)
 {
     lavaSocketClient = _lavaSocketClient;
     lavaRestClient   = _lavaRestClient;
     isSearching      = false;
 }
示例#17
0
 public MusicService(LavaRestClient lavaRestClient, DiscordShardedClient client, LavaShardClient lavaShardClient)
 {
     _client          = client;
     _lavaRestClient  = lavaRestClient;
     _lavaShardClient = lavaShardClient;
 }
示例#18
0
 public SpotifyTrackConverter(LavaRestClient lavaRest, SpotifyConfig config)
 {
     this.LavaRest = lavaRest;
     this.Config   = config;
 }
示例#19
0
 public AudioService(LavaSocketClient lavaClient, LavaRestClient lavaRestClient)
 {
     LavaClient         = lavaClient;
     LavaRestClient     = lavaRestClient;
     Music.AudioService = this;
 }