1
0
mirror of https://github.com/musix-org/musix-oss synced 2024-12-22 18:03:17 +00:00

patched error with keys (temporary)

This commit is contained in:
MatteZ02 2020-07-12 19:16:54 +03:00
parent 163b6ce836
commit 2686829e80
2 changed files with 2 additions and 2 deletions

View File

@ -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) {

View File

@ -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 = {};