mrmBot-Matrix/commands/fun/sonic.js

21 lines
746 B
JavaScript
Raw Normal View History

const wrap = require("../../utils/wrap.js");
const ImageCommand = require("../../classes/imageCommand.js");
class SonicCommand extends ImageCommand {
params() {
const cleanedMessage = this.args.join(" ").replaceAll("&", "\\&amp;").replaceAll(">", "\\&gt;").replaceAll("<", "\\&lt;").replaceAll("\"", "\\&quot;").replaceAll("'", "\\&apos;").replaceAll("%", "\\%");
return {
text: wrap(cleanedMessage, {width: 15, indent: ""})
};
}
static description = "Creates a Sonic speech bubble image";
static arguments = ["[text]"];
static requiresImage = false;
static requiresText = true;
2021-05-24 19:31:44 +00:00
static noText = "You need to provide some text to make a Sonic meme!";
static command = "sonic";
}
module.exports = SonicCommand;