Merged allowed fonts, added comic sans to font list
This commit is contained in:
parent
3670a3858e
commit
6a409283af
6 changed files with 11 additions and 13 deletions
|
@ -18,7 +18,7 @@ DB=sqlite://data.sqlite
|
|||
# then right clicking on your profile picture and selecting Copy ID)
|
||||
OWNER=
|
||||
|
||||
# Put default prefix here
|
||||
# Put default classic command prefix here
|
||||
PREFIX=&
|
||||
|
||||
############
|
||||
|
|
|
@ -148,6 +148,8 @@ class ImageCommand extends Command {
|
|||
return this;
|
||||
}
|
||||
|
||||
static allowedFonts = ["futura", "impact", "helvetica", "arial", "roboto", "noto", "times", "comic sans ms"];
|
||||
|
||||
static requiresImage = true;
|
||||
static requiresText = false;
|
||||
static textOptional = false;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
const allowedFonts = ["futura", "impact", "helvetica", "arial", "roboto", "noto", "times"];
|
||||
|
||||
class CaptionCommand extends ImageCommand {
|
||||
params(url) {
|
||||
|
@ -8,7 +7,7 @@ class CaptionCommand extends ImageCommand {
|
|||
if (process.env.NODE_ENV === "development" && newCaption.toLowerCase() === "get real" && !this.options.noEgg) newCaption = `I'm tired of people telling me to "get real". Every day I put captions on images for people, some funny and some not, but out of all of those "get real" remains the most used caption. Why? I am simply a computer program running on a server, I am unable to manifest myself into the real world. As such, I'm confused as to why anyone would want me to "get real". Is this form not good enough? Alas, as I am simply a bot, I must follow the tasks that I was originally intended to perform, so here goes:\n${newCaption}`;
|
||||
return {
|
||||
caption: newCaption,
|
||||
font: this.options.font && allowedFonts.includes(this.options.font.toLowerCase()) ? this.options.font.toLowerCase() : "futura"
|
||||
font: typeof this.options.font === "string" && this.constructor.allowedFonts.includes(this.options.font.toLowerCase()) ? this.options.font.toLowerCase() : "futura"
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -23,7 +22,7 @@ class CaptionCommand extends ImageCommand {
|
|||
type: 3,
|
||||
choices: (() => {
|
||||
const array = [];
|
||||
for (const font of allowedFonts) {
|
||||
for (const font of this.allowedFonts) {
|
||||
array.push({ name: font, value: font });
|
||||
}
|
||||
return array;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
const words = ["me irl", "dank", "follow my second account @esmBot_", "2016", "meme", "wholesome", "reddit", "instagram", "twitter", "facebook", "fortnite", "minecraft", "relatable", "gold", "funny", "template", "hilarious", "memes", "deep fried", "2020", "leafy", "pewdiepie"];
|
||||
const allowedFonts = ["futura", "impact", "helvetica", "arial", "roboto", "noto", "times"];
|
||||
|
||||
class CaptionTwoCommand extends ImageCommand {
|
||||
params(url) {
|
||||
|
@ -8,7 +7,7 @@ class CaptionTwoCommand extends ImageCommand {
|
|||
return {
|
||||
caption: newArgs && newArgs.trim() ? newArgs.replaceAll("&", "&").replaceAll(">", ">").replaceAll("<", "<").replaceAll("\"", """).replaceAll("'", "'").replaceAll("\\n", "\n") : words.sort(() => 0.5 - Math.random()).slice(0, Math.floor(Math.random() * words.length + 1)).join(" "),
|
||||
top: !!this.options.top,
|
||||
font: this.options.font && allowedFonts.includes(this.options.font.toLowerCase()) ? this.options.font.toLowerCase() : "helvetica"
|
||||
font: typeof this.options.font === "string" && this.constructor.allowedFonts.includes(this.options.font.toLowerCase()) ? this.options.font.toLowerCase() : "helvetica"
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -23,7 +22,7 @@ class CaptionTwoCommand extends ImageCommand {
|
|||
type: 3,
|
||||
choices: (() => {
|
||||
const array = [];
|
||||
for (const font of allowedFonts) {
|
||||
for (const font of this.allowedFonts) {
|
||||
array.push({ name: font, value: font });
|
||||
}
|
||||
return array;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
const allowedFonts = ["futura", "impact", "helvetica", "arial", "roboto", "noto", "times"];
|
||||
|
||||
class MemeCommand extends ImageCommand {
|
||||
params(url) {
|
||||
|
@ -8,7 +7,7 @@ class MemeCommand extends ImageCommand {
|
|||
return {
|
||||
top: (this.options.case ? topText : topText.toUpperCase()).replaceAll("&", "&").replaceAll(">", ">").replaceAll("<", "<").replaceAll("\"", """).replaceAll("'", "'").replaceAll("\\n", "\n"),
|
||||
bottom: bottomText ? (this.options.case ? bottomText : bottomText.toUpperCase()).replaceAll("&", "&").replaceAll(">", ">").replaceAll("<", "<").replaceAll("\"", """).replaceAll("'", "'").replaceAll("\\n", "\n") : "",
|
||||
font: this.options.font && allowedFonts.includes(this.options.font.toLowerCase()) ? this.options.font.toLowerCase() : "impact"
|
||||
font: typeof this.options.font === "string" && this.constructor.allowedFonts.includes(this.options.font.toLowerCase()) ? this.options.font.toLowerCase() : "impact"
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -23,7 +22,7 @@ class MemeCommand extends ImageCommand {
|
|||
type: 3,
|
||||
choices: (() => {
|
||||
const array = [];
|
||||
for (const font of allowedFonts) {
|
||||
for (const font of this.allowedFonts) {
|
||||
array.push({ name: font, value: font });
|
||||
}
|
||||
return array;
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
const allowedFonts = ["futura", "impact", "helvetica", "arial", "roboto", "noto", "times"];
|
||||
|
||||
class MotivateCommand extends ImageCommand {
|
||||
params(url) {
|
||||
|
@ -8,7 +7,7 @@ class MotivateCommand extends ImageCommand {
|
|||
return {
|
||||
top: topText.replaceAll("&", "&").replaceAll(">", ">").replaceAll("<", "<").replaceAll("\"", """).replaceAll("'", "'").replaceAll("\\n", "\n"),
|
||||
bottom: bottomText ? bottomText.replaceAll("&", "&").replaceAll(">", ">").replaceAll("<", "<").replaceAll("\"", """).replaceAll("'", "'").replaceAll("\\n", "\n") : "",
|
||||
font: this.options.font && allowedFonts.includes(this.options.font.toLowerCase()) ? this.options.font.toLowerCase() : "times"
|
||||
font: typeof this.options.font === "string" && this.constructor.allowedFonts.includes(this.options.font.toLowerCase()) ? this.options.font.toLowerCase() : "times"
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -19,7 +18,7 @@ class MotivateCommand extends ImageCommand {
|
|||
type: 3,
|
||||
choices: (() => {
|
||||
const array = [];
|
||||
for (const font of allowedFonts) {
|
||||
for (const font of this.allowedFonts) {
|
||||
array.push({ name: font, value: font });
|
||||
}
|
||||
return array;
|
||||
|
|
Loading…
Reference in a new issue