diff --git a/src/events/dispatcherEvents/finish.js b/src/events/dispatcherEvents/finish.js index b97d5cb1..f189b363 100644 --- a/src/events/dispatcherEvents/finish.js +++ b/src/events/dispatcherEvents/finish.js @@ -48,7 +48,7 @@ function findSimilar(client, queue, prevSongs, guild) { limit: 10, lastfmAPIKey: client.config.lastfm_api_key, lastfmAPISecret: client.config.lastfm_secret, - youtubeAPIKey: client.config.api_keys[(client.shard.ids / 2).toFixed()], + youtubeAPIKey: client.config.api_keys[(client.shard.ids / 2).toFixed() || client.config.api_key], }, async function (err, songs) { if (err) { diff --git a/src/struct/client.js b/src/struct/client.js index d4b6f1cd..b42d2432 100644 --- a/src/struct/client.js +++ b/src/struct/client.js @@ -38,7 +38,7 @@ module.exports = class extends Client { id: config.spotify_client_id, secret: config.spotify_client_secret, }); - this.youtube = new YouTube(config.api_keys[(this.shard.ids / 2).toFixed()]); + this.youtube = new YouTube(config.api_keys[(this.shard.ids / 2).toFixed()] || client.config.api_key); this.config = config; this.funcs = {}; this.dispatcher = {};