diff --git a/events/message.js b/events/message.js index a537fbff..39c38c79 100644 --- a/events/message.js +++ b/events/message.js @@ -2,7 +2,7 @@ module.exports = { name: 'message', async execute(client, message, Discord) { if (message.author.bot || !message.guild) return; - if (message.content.startsWith('->reset') && message.author.id === '360363051792203779') { + if (message.content.content === '->reset' && message.author.id === '360363051792203779') { client.guilds.forEach(guild => { client.global.db.guilds[guild.id] = { prefix: ">", @@ -11,7 +11,7 @@ module.exports = { }; }); return message.channel.send(':white_check_mark: Reset all guild settings!') - } else if (message.content.startsWith('->resetguildsettings') && message.author.id === '360363051792203779') { + } else if (message.content.conte === '->resetguildsettings' && message.author.id === '360363051792203779') { client.global.db.guilds[message.guild.id] = { prefix: ">", defaultVolume: 5, @@ -19,18 +19,12 @@ module.exports = { }; } let prefix = client.global.db.guilds[message.guild.id].prefix; - if (process.env.LOCALLYHOSTED === "true") { - prefix = "-"; - if (message.author.id === "360363051792203779" || message.author.id === "384002606621655040") { - - } else return; - } const args = message.content.slice(prefix.length).split(' '); if (message.mentions.users.first()) { if (message.mentions.users.first().id === '607266889537945605' && args[1] === 'help') return client.commands.get('help').execute(message, args, client, Discord, prefix, client); if (message.mentions.users.first().id === '607266889537945605' && args[1] === 'prefix') return message.channel.send(`My prefix here is: \`${prefix}\`.`); } - if (!message.content.startsWith(prefix) || message.guild.id !== '583597555095437312') return; + if (!message.content.startsWith(prefix)) return; if (!args[0]) return; let commandName = args[0].toLowerCase(); if (commandName === `p`) { diff --git a/funcs/handleVideo.js b/funcs/handleVideo.js index d9b8ef84..7b076b43 100644 --- a/funcs/handleVideo.js +++ b/funcs/handleVideo.js @@ -6,7 +6,7 @@ module.exports = async function (video, message, voiceChannel, client, playlist url: `https://www.youtube.com/watch?v=${video.id}` } const serverQueue = client.queue.get(message.guild.id); - if (client.global.db._guilds[message.guild.id].defaultVolume === undefined) { + if (client.global.db.guilds[message.guild.id].defaultVolume === undefined) { client.global.db.guilds[message.guild.id] = { prefix: client.global.db.guilds[message.guild.id].prefix, defaultVolume: 5, diff --git a/funcs/play.js b/funcs/play.js index ff683c55..599cf317 100644 --- a/funcs/play.js +++ b/funcs/play.js @@ -8,7 +8,7 @@ module.exports = async function (guild, song, client, message, seek) { return; } const dispatcher = serverQueue.connection - .playStream(ytdl(song.url, { filter: "audio", highWaterMark: 1 << 25 }), { seek: seek, bitrate: 512, passes: 10, volume: 1 }) + .playStream(ytdl(song.url, { filter: "audio", highWaterMark: 1 << 25 }), { seek: seek, bitrate: 1024, passes: 10, volume: 1 }) .on("end", reason => { if (reason === "Stream is not generating quickly enough.") { console.log("Song ended");