Added snapchat, prevent image queue packet from being sent twice

This commit is contained in:
TheEssem 2021-06-14 22:03:48 -05:00
parent 0ed7d1f57a
commit 52d91b752d
No known key found for this signature in database
GPG key ID: A3F9F02129092FCA
5 changed files with 119 additions and 14 deletions

View file

@ -0,0 +1,21 @@
const ImageCommand = require("../../classes/imageCommand.js");
class SnapchatCommand extends ImageCommand {
params(args, url) {
const newArgs = args.filter(item => !item.includes(url));
return {
caption: newArgs.join(" ").replaceAll("&", "\\&amp;").replaceAll(">", "\\&gt;").replaceAll("<", "\\&lt;").replaceAll("\"", "\\&quot;").replaceAll("'", "\\&apos;").replaceAll("%", "\\%")
};
}
static description = "Adds a Snapchat style caption to an image";
static aliases = ["snap", "caption3"];
static arguments = ["[text]"];
static requiresText = true;
static noText = "You need to provide some text to add a caption!";
static noImage = "You need to provide an image to add a caption!";
static command = "snapchat";
}
module.exports = SnapchatCommand;