From 8d5cd12a4549e1f10fd43b4daa7229c2155da7cf Mon Sep 17 00:00:00 2001 From: Essem Date: Thu, 16 Sep 2021 00:01:54 -0500 Subject: [PATCH] oops haha --- commands/music/loop.js | 2 -- commands/music/nowplaying.js | 2 -- commands/music/pause.js | 2 -- commands/music/play.js | 2 -- commands/music/queue.js | 4 ++-- commands/music/skip.js | 2 -- commands/music/stop.js | 2 -- 7 files changed, 2 insertions(+), 14 deletions(-) diff --git a/commands/music/loop.js b/commands/music/loop.js index 2482d2e..f1681cd 100644 --- a/commands/music/loop.js +++ b/commands/music/loop.js @@ -3,8 +3,6 @@ import MusicCommand from "../../classes/musicCommand.js"; class LoopCommand extends MusicCommand { async run() { - if (process.env.NODE_ENV === "production" && this.message.author.id !== process.env.OWNER) return "Music commands are coming soon, but they aren't ready yet. Stay tuned to @esmBot_ on Twitter for updates!"; - if (!this.message.channel.guild) return "This command only works in servers!"; if (!this.message.member.voiceState.channelID) return "You need to be in a voice channel first!"; if (!this.message.channel.guild.members.get(this.client.user.id).voiceState.channelID) return "I'm not in a voice channel!"; diff --git a/commands/music/nowplaying.js b/commands/music/nowplaying.js index d3ee0ae..62d6d4d 100644 --- a/commands/music/nowplaying.js +++ b/commands/music/nowplaying.js @@ -4,8 +4,6 @@ import MusicCommand from "../../classes/musicCommand.js"; class NowPlayingCommand extends MusicCommand { async run() { - if (process.env.NODE_ENV === "production" && this.message.author.id !== process.env.OWNER) return "Music commands are coming soon, but they aren't ready yet. Stay tuned to @esmBot_ on Twitter for updates!"; - if (!this.message.channel.guild) return "This command only works in servers!"; if (!this.message.member.voiceState.channelID) return "You need to be in a voice channel first!"; if (!this.message.channel.guild.members.get(this.client.user.id).voiceState.channelID) return "I'm not in a voice channel!"; diff --git a/commands/music/pause.js b/commands/music/pause.js index 3119c27..5fef5e3 100644 --- a/commands/music/pause.js +++ b/commands/music/pause.js @@ -2,8 +2,6 @@ import MusicCommand from "../../classes/musicCommand.js"; class PauseCommand extends MusicCommand { async run() { - if (process.env.NODE_ENV === "production" && this.message.author.id !== process.env.OWNER) return "Music commands are coming soon, but they aren't ready yet. Stay tuned to @esmBot_ on Twitter for updates!"; - if (!this.message.channel.guild) return "This command only works in servers!"; if (!this.message.member.voiceState.channelID) return "You need to be in a voice channel first!"; if (!this.message.channel.guild.members.get(this.client.user.id).voiceState.channelID) return "I'm not in a voice channel!"; diff --git a/commands/music/play.js b/commands/music/play.js index f19b052..730912a 100644 --- a/commands/music/play.js +++ b/commands/music/play.js @@ -5,8 +5,6 @@ const searchRegex = /^ytsearch:/; class PlayCommand extends MusicCommand { async run() { - if (process.env.NODE_ENV === "production" && this.message.author.id !== process.env.OWNER) return "Music commands are coming soon, but they aren't ready yet. Stay tuned to @esmBot_ on Twitter for updates!"; - if (!this.args[0]) return "You need to provide what you want to play!"; const query = this.args.join(" ").trim(); const search = urlRegex.test(query) ? query : (searchRegex.test(query) ? query : `ytsearch:${query}`); diff --git a/commands/music/queue.js b/commands/music/queue.js index 7e503e5..7c3a97c 100644 --- a/commands/music/queue.js +++ b/commands/music/queue.js @@ -1,4 +1,5 @@ import { queues } from "../../utils/soundplayer.js"; +//import { Rest } from "lavacord"; import fetch from "node-fetch"; import format from "format-duration"; import paginator from "../../utils/pagination/pagination.js"; @@ -6,14 +7,13 @@ import MusicCommand from "../../classes/musicCommand.js"; class QueueCommand extends MusicCommand { async run() { - if (process.env.NODE_ENV === "production" && this.message.author.id !== process.env.OWNER) return "Music commands are coming soon, but they aren't ready yet. Stay tuned to @esmBot_ on Twitter for updates!"; - if (!this.message.channel.guild) return "This command only works in servers!"; if (!this.message.member.voiceState.channelID) return "You need to be in a voice channel first!"; if (!this.message.channel.guild.members.get(this.client.user.id).voiceState.channelID) return "I'm not in a voice channel!"; if (!this.message.channel.permissionsOf(this.client.user.id).has("embedLinks")) return "I don't have the `Embed Links` permission!"; const queue = queues.get(this.message.channel.guild.id); const player = this.connection; + //const tracks = await Rest.decode(player.player.node, queue); const tracks = await fetch(`http://${player.player.node.host}:${player.player.node.port}/decodetracks`, { method: "POST", body: JSON.stringify(queue), headers: { Authorization: player.player.node.password, "Content-Type": "application/json" } }).then(res => res.json()); const trackList = []; const firstTrack = tracks.shift(); diff --git a/commands/music/skip.js b/commands/music/skip.js index 392009d..45e735a 100644 --- a/commands/music/skip.js +++ b/commands/music/skip.js @@ -3,8 +3,6 @@ import MusicCommand from "../../classes/musicCommand.js"; class SkipCommand extends MusicCommand { async run() { - if (process.env.NODE_ENV === "production" && this.message.author.id !== process.env.OWNER) return "Music commands are coming soon, but they aren't ready yet. Stay tuned to @esmBot_ on Twitter for updates!"; - if (!this.message.channel.guild) return "This command only works in servers!"; if (!this.message.member.voiceState.channelID) return "You need to be in a voice channel first!"; if (!this.message.channel.guild.members.get(this.client.user.id).voiceState.channelID) return "I'm not in a voice channel!"; diff --git a/commands/music/stop.js b/commands/music/stop.js index 7e7c066..98d64a9 100644 --- a/commands/music/stop.js +++ b/commands/music/stop.js @@ -3,8 +3,6 @@ import MusicCommand from "../../classes/musicCommand.js"; class StopCommand extends MusicCommand { async run() { - if (process.env.NODE_ENV === "production" && this.message.author.id !== process.env.OWNER) return "Music commands are coming soon, but they aren't ready yet. Stay tuned to @esmBot_ on Twitter for updates!"; - if (!this.message.channel.guild) return "This command only works in servers!"; if (!this.message.member.voiceState.channelID) return "You need to be in a voice channel first!"; if (!this.message.channel.guild.members.get(this.client.user.id).voiceState.channelID) return "I'm not in a voice channel!";