Adjusted flag sizing some more, removed fortnite, added some database connection args
This commit is contained in:
parent
6056e49728
commit
56faea8d59
4 changed files with 2 additions and 12 deletions
Binary file not shown.
|
@ -12,8 +12,7 @@ exports.run = async (message, args) => {
|
||||||
const flag = emoji.unemojify(args[0]).replace(/:/g, "").replace("flag-", "");
|
const flag = emoji.unemojify(args[0]).replace(/:/g, "").replace("flag-", "");
|
||||||
let path = `./assets/images/region-flags/png/${flag.toUpperCase()}.png`;
|
let path = `./assets/images/region-flags/png/${flag.toUpperCase()}.png`;
|
||||||
if (flag === "🏴☠️") path = "./assets/images/pirateflag.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("%[fx:u.w]x%[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(...(size.width < size.height ? ["%[fx:u.w]", null] : [null, "%[fx:u.h]"])).out("-layers", "composite").bufferPromise(image.type, image.delay);
|
|
||||||
return {
|
return {
|
||||||
file: buffer,
|
file: buffer,
|
||||||
name: `flag.${image.type}`
|
name: `flag.${image.type}`
|
||||||
|
|
|
@ -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";
|
|
|
@ -1,6 +1,6 @@
|
||||||
// database stuff
|
// database stuff
|
||||||
const mongoose = require("mongoose");
|
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({
|
const guildSchema = new mongoose.Schema({
|
||||||
id: String,
|
id: String,
|
||||||
tags: Map,
|
tags: Map,
|
||||||
|
|
Loading…
Reference in a new issue