diff --git a/src/structure/components/commands/administration/Import.js b/src/structure/components/commands/administration/Import.js index 2b50c1e..eb8918f 100644 --- a/src/structure/components/commands/administration/Import.js +++ b/src/structure/components/commands/administration/Import.js @@ -51,18 +51,18 @@ class ImportCommand extends SlashCommand { async execute(invoker, { version, overwrite }) { const { subcommand, guild } = invoker; - let settings = await guild.settings(); - if (!settings._imported) settings._imported = {}; - if (settings._imported[subcommand.name]) return { emoji: 'failure', index: 'COMMAND_IMPORT_IMPORTED', params: { thing: Util.capitalise(subcommand.name) } }; + const data = await guild.fetchData(); + if (!data._imported) data._imported = {}; + if (data._imported[subcommand.name]) return { emoji: 'failure', index: 'COMMAND_IMPORT_IMPORTED', params: { thing: Util.capitalise(subcommand.name) } }; version = version?.value || '3'; await invoker.reply({ index: 'COMMAND_IMPORT_WORKING', emoji: 'loading' }); const result = await this[subcommand.name](guild, version, overwrite?.value); // This looks ridiculous but it's to keep track of what's been imported - settings = guild._settings; - if (!settings.imported) settings.imported = {}; - settings.imported[subcommand.name] = true; + // if (!settings.imported) settings.imported = {}; + data._imported[subcommand.name] = true; + await guild.updateData({ _imported: data._imported }); result._edit = true; return result;