Fixed audio commands and whisper

This commit is contained in:
Essem 2022-03-31 13:47:22 -05:00
parent 2cffdf6628
commit f0f0bff8f3
No known key found for this signature in database
GPG key ID: 7D497397CC3A2A8C
2 changed files with 6 additions and 4 deletions

View file

@ -2,9 +2,9 @@ import ImageCommand from "../../classes/imageCommand.js";
class WhisperCommand extends ImageCommand {
params(url) {
const newArgs = this.args.filter(item => !item.includes(url));
const newArgs = this.type === "classic" ? this.args.filter(item => !item.includes(url)).join(" ") : this.options.text;
return {
caption: newArgs.join(" ").replaceAll("&", "\\&amp;").replaceAll(">", "\\&gt;").replaceAll("<", "\\&lt;").replaceAll("\"", "\\&quot;").replaceAll("'", "\\&apos;").replaceAll("%", "\\%")
caption: newArgs.replaceAll("&", "\\&amp;").replaceAll(">", "\\&gt;").replaceAll("<", "\\&lt;").replaceAll("\"", "\\&quot;").replaceAll("'", "\\&apos;").replaceAll("%", "\\%")
};
}