From 176960fa24a91f8f365d1ccbc4a91715f4ea2e08 Mon Sep 17 00:00:00 2001 From: MatteZ02 <47610069+MatteZ02@users.noreply.github.com> Date: Fri, 1 Nov 2019 14:37:31 +0200 Subject: [PATCH] fixed apikey --- commands/play.js | 2 +- index.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/play.js b/commands/play.js index 382989d7..d18c3b0a 100644 --- a/commands/play.js +++ b/commands/play.js @@ -10,7 +10,7 @@ module.exports = { cooldown: 3, onlyDev: false, async execute(message, args, client, Discord, prefix) { - const youtube = new YouTube(client.config.apikey); + const youtube = new YouTube(client.config.api_key); const searchString = args.slice(1).join(" "); const url = args[1] ? args[1].replace(/<(.+)>/g, "$1") : ""; const serverQueue = client.queue.get(message.guild.id); diff --git a/index.js b/index.js index 329fd810..9869e70e 100644 --- a/index.js +++ b/index.js @@ -27,7 +27,6 @@ client.commandAliases = new Discord.Collection(); client.playlistCmd = new Discord.Collection(); client.settingCmd = new Discord.Collection(); client.events = new Discord.Collection(); -client.cooldowns = new Discord.Collection(); client.queue = new Map(); client.funcs = {}; @@ -45,6 +44,7 @@ for (const file of commandFiles) { client.commands.set(command.name, command); client.commandAliases.set(command.alias, command); } + const eventFiles = fs.readdirSync('./events/').filter(f => f.endsWith('.js')); for (const file of eventFiles) { const event = require(`./events/${file}`);