mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-13 00:09:08 +02:00
Fix
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
const Command = require('../../structures/Command');
|
const Command = require('../../structures/Command');
|
||||||
const request = require('node-superfetch');
|
const request = require('node-superfetch');
|
||||||
const Entities = require('html-entities').AllHtmlEntities;
|
const { decode: decodeHTML } = require('html-entities');
|
||||||
const entities = new Entities();
|
|
||||||
const { stripIndents } = require('common-tags');
|
const { stripIndents } = require('common-tags');
|
||||||
const { verify, formatNumber } = require('../../util/Util');
|
const { verify, formatNumber } = require('../../util/Util');
|
||||||
|
|
||||||
@@ -30,7 +29,7 @@ module.exports = class WillYouPressTheButtonCommand extends Command {
|
|||||||
try {
|
try {
|
||||||
const dilemma = await this.fetchDilemma();
|
const dilemma = await this.fetchDilemma();
|
||||||
await msg.reply(stripIndents`
|
await msg.reply(stripIndents`
|
||||||
**${entities.decode(dilemma.txt1)}** but **${entities.decode(dilemma.txt2)}**
|
**${decodeHTML(dilemma.txt1)}** but **${decodeHTML(dilemma.txt2)}**
|
||||||
|
|
||||||
Will you press the button?
|
Will you press the button?
|
||||||
_Respond with [y]es or [n]o to continue._
|
_Respond with [y]es or [n]o to continue._
|
||||||
|
|||||||
+2
-3
@@ -1,6 +1,5 @@
|
|||||||
const crypto = require('crypto');
|
const crypto = require('crypto');
|
||||||
const Entities = require('html-entities').AllHtmlEntities;
|
const { decode: decodeHTML } = require('html-entities');
|
||||||
const entities = new Entities();
|
|
||||||
const { stripIndents } = require('common-tags');
|
const { stripIndents } = require('common-tags');
|
||||||
const { SUCCESS_EMOJI_ID } = process.env;
|
const { SUCCESS_EMOJI_ID } = process.env;
|
||||||
const yes = ['yes', 'y', 'ye', 'yeah', 'yup', 'yea', 'ya', 'hai', 'si', 'sí', 'oui', 'はい', 'correct'];
|
const yes = ['yes', 'y', 'ye', 'yeah', 'yup', 'yea', 'ya', 'hai', 'si', 'sí', 'oui', 'はい', 'correct'];
|
||||||
@@ -270,7 +269,7 @@ module.exports = class Util {
|
|||||||
static cleanAnilistHTML(html, removeLineBreaks = true) {
|
static cleanAnilistHTML(html, removeLineBreaks = true) {
|
||||||
let clean = html;
|
let clean = html;
|
||||||
if (removeLineBreaks) clean = clean.replace(/\r|\n|\f/g, '');
|
if (removeLineBreaks) clean = clean.replace(/\r|\n|\f/g, '');
|
||||||
clean = entities.decode(clean);
|
clean = decodeHTML(clean);
|
||||||
clean = clean
|
clean = clean
|
||||||
.replaceAll('<br>', '\n')
|
.replaceAll('<br>', '\n')
|
||||||
.replace(/<\/?i>/g, '*')
|
.replace(/<\/?i>/g, '*')
|
||||||
|
|||||||
Reference in New Issue
Block a user