Centralize text encoding
This commit is contained in:
parent
20f4849fee
commit
3eae453de3
9 changed files with 23 additions and 34 deletions
|
@ -1,9 +1,10 @@
|
|||
//import wrap from "../../utils/wrap.js";
|
||||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
import { textEncode } from "../../utils/misc.js";
|
||||
|
||||
class SonicCommand extends ImageCommand {
|
||||
params() {
|
||||
const cleanedMessage = (this.options.text ?? this.args.join(" ")).replaceAll("&", "&").replaceAll(">", ">").replaceAll("<", "<").replaceAll("\"", """).replaceAll("'", "'").replaceAll("\\n", "\n");
|
||||
const cleanedMessage = textEncode(this.options.text ?? this.args.join(" "));
|
||||
return {
|
||||
text: cleanedMessage
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue