mirror of
https://github.com/Hessenuk/DiscordTickets.git
synced 2024-11-05 04:13:08 +02:00
fix: creating multi-category panels in non-english locales
The Discord client replaces `,` with `.` in some locales (why!!?). This removes the requirement for category IDs to be separated by commas.
This commit is contained in:
parent
4146665e13
commit
c607771c9e
@ -67,9 +67,7 @@ module.exports = class PanelCommand extends Command {
|
||||
const default_i18n = this.client.i18n.getLocale(this.client.config.defaults.locale); // command properties could be in a different locale
|
||||
const i18n = this.client.i18n.getLocale(settings.locale);
|
||||
|
||||
const categories = interaction.options.getString(default_i18n('commands.panel.options.categories.name'))
|
||||
.replace(/\s/g, '')
|
||||
.split(',');
|
||||
const categories = interaction.options.getString(default_i18n('commands.panel.options.categories.name')).match(/\d{17,19}/g) ?? [];
|
||||
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'));
|
||||
|
Loading…
Reference in New Issue
Block a user