From bcf474cc1c8a45f9a83f3a014ef628ed949919a7 Mon Sep 17 00:00:00 2001 From: Isaac Date: Tue, 31 Jan 2023 15:18:40 +0000 Subject: [PATCH] fix: use environment variables --- src/commands/slash/tickets.js | 2 +- src/lib/tickets/archiver.js | 2 +- user/example.config.yml | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/commands/slash/tickets.js b/src/commands/slash/tickets.js index 7ed1f2b..95a0d91 100644 --- a/src/commands/slash/tickets.js +++ b/src/commands/slash/tickets.js @@ -122,7 +122,7 @@ module.exports = class TicketsSlashCommand extends SlashCommand { .setTitle(getMessage(`commands.slash.tickets.response.title.${ownOrOther}`, { displayName: member.displayName })) .setFields(fields); - if (settings.archive && !client.config.overrides.disableArchives) { + if (settings.archive && process.env.OVERRIDE_ARCHIVE !== 'false') { const transcriptCommand = client.application.commands.cache.find(c => c.name === 'transcript'); embed.setDescription(getMessage('commands.slash.tickets.response.description', { transcript: `` })); } diff --git a/src/lib/tickets/archiver.js b/src/lib/tickets/archiver.js index 04afac4..6687018 100644 --- a/src/lib/tickets/archiver.js +++ b/src/lib/tickets/archiver.js @@ -21,7 +21,7 @@ module.exports = class TicketArchiver { * @returns {import("@prisma/client").ArchivedMessage|boolean} */ async saveMessage(ticketId, message, external = false) { - if (this.client.config.overrides.disableArchives) return false; + if (process.env.OVERRIDE_ARCHIVE === 'false') return false; if (!message.member) { try { diff --git a/user/example.config.yml b/user/example.config.yml index 56e3b8c..c8a2297 100644 --- a/user/example.config.yml +++ b/user/example.config.yml @@ -20,8 +20,6 @@ logs: enabled: true keepFor: 30 level: info -overrides: - disableArchives: false presence: activities: - name: /new