fix: new lines in opening message and panels

This commit is contained in:
Isaac 2021-10-07 11:27:54 +01:00
parent eb964ab85b
commit 09d9c4d5a2
No known key found for this signature in database
GPG Key ID: 87B9B6BD04EB7534
2 changed files with 2 additions and 2 deletions

View File

@ -70,7 +70,7 @@ module.exports = class PanelCommand extends Command {
const categories = interaction.options.getString(default_i18n('commands.panel.options.categories.name'))
.replace(/\s/g, '')
.split(',');
const description = interaction.options.getString(default_i18n('commands.panel.options.description.name'));
const description = interaction.options.getString(default_i18n('commands.panel.options.description.name'))?.replace(/\\n/g, '\n');
const image = interaction.options.getString(default_i18n('commands.panel.options.image.name'));
const just_type = interaction.options.getBoolean(default_i18n('commands.panel.options.just_type.name'));
const title = interaction.options.getString(default_i18n('commands.panel.options.title.name'));

View File

@ -297,7 +297,7 @@ module.exports = class SettingsCommand extends Command {
if (image !== null) category.set('image', image);
if (name !== null) category.set('name', name);
if (name_format !== null) category.set('name_format', name_format);
if (opening_message !== null) category.set('opening_message', opening_message);
if (opening_message !== null) category.set('opening_message', opening_message.replace(/\\n/g, '\n'));
if (opening_questions !== null) category.set('opening_questions', JSON.parse(opening_questions));
if (ping !== null) category.set('ping', ping.replace(/\s/g, '').split(','));
if (require_topic !== null) category.set('require_topic', require_topic);