diff --git a/assets/audio/fortnite.opus b/assets/audio/fortnite.opus deleted file mode 100644 index 0341ac1..0000000 Binary files a/assets/audio/fortnite.opus and /dev/null differ diff --git a/commands/flag.js b/commands/flag.js index a2392be..baad461 100644 --- a/commands/flag.js +++ b/commands/flag.js @@ -12,8 +12,7 @@ exports.run = async (message, args) => { const flag = emoji.unemojify(args[0]).replace(/:/g, "").replace("flag-", ""); let path = `./assets/images/region-flags/png/${flag.toUpperCase()}.png`; if (flag === "🏴‍☠️") path = "./assets/images/pirateflag.png"; - const size = await gm(image.path).sizePromise(); - const buffer = await gm(image.path).coalesce().out("null:").out("(", path, "-alpha", "set", "-channel", "A", "-evaluate", "multiply", "0.5", "+channel", ")").gravity("North").scale(...(size.width < size.height ? ["%[fx:u.w]", null] : [null, "%[fx:u.h]"])).out("-layers", "composite").bufferPromise(image.type, image.delay); + const buffer = await gm(image.path).coalesce().out("null:").out("(", path, "-alpha", "set", "-channel", "A", "-evaluate", "multiply", "0.5", "+channel", ")").gravity("North").scale("%[fx:u.w]x%[fx:u.h]!").out("-layers", "composite").bufferPromise(image.type, image.delay); return { file: buffer, name: `flag.${image.type}` diff --git a/commands/fortnite.js b/commands/fortnite.js deleted file mode 100644 index 7c867b2..0000000 --- a/commands/fortnite.js +++ /dev/null @@ -1,9 +0,0 @@ -const playSound = require("../utils/soundplayer.js"); - -exports.run = async (message) => { - return playSound("./assets/audio/fortnite.opus", message); -}; - -exports.aliases = ["dance", "defaultdance"]; -exports.category = 6; -exports.help = "Plays the Fortnite default dance sound"; \ No newline at end of file diff --git a/utils/database.js b/utils/database.js index 00b8d34..10438b7 100644 --- a/utils/database.js +++ b/utils/database.js @@ -1,6 +1,6 @@ // database stuff const mongoose = require("mongoose"); -mongoose.connect(process.env.MONGO); +mongoose.connect(process.env.MONGO, { poolSize: 10, bufferMaxEntries: 0, reconnectTries: 5000, useNewUrlParser: true, useUnifiedTopology: true }); const guildSchema = new mongoose.Schema({ id: String, tags: Map,