Refactored image/embed handling to prepare for something, don't use fuzz with sonic
This commit is contained in:
parent
2fbad4a38a
commit
f6425dc294
62 changed files with 122 additions and 119 deletions
|
@ -38,8 +38,10 @@ module.exports = async (message) => {
|
|||
logger.log("info", `${message.author.username} (${message.author.id}) ran command ${command}`);
|
||||
try {
|
||||
const result = await cmd(message, args, content.replace(command, "").trim()); // we also provide the message content as a parameter for cases where we need more accuracy
|
||||
if (typeof result === "string") {
|
||||
if (typeof result === "string" || (typeof result === "object" && result.embed)) {
|
||||
await client.createMessage(message.channel.id, result);
|
||||
} else if (typeof result === "object" && result.file) {
|
||||
await client.createMessage(message.channel.id, result.text ? result.text : "", result);
|
||||
}
|
||||
} catch (error) {
|
||||
if (!error.toString().includes("Request entity too large")) {
|
||||
|
|
|
@ -72,7 +72,7 @@ module.exports = async () => {
|
|||
type !== "sonic" ? "-layers" : "",
|
||||
type !== "sonic" ? "OptimizeTransparency" : ""
|
||||
)
|
||||
.out("-fuzz", "2%")
|
||||
.out(type !== "sonic" ? "-fuzz" : "", type !== "sonic" ? "2%" : "")
|
||||
.out("-limit", "memory", "64MB")
|
||||
.out("-limit", "map", "128MB")
|
||||
.stream(format, (err, stdout, stderr) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue