From d7d42a1bfa790fc219b6006aec3ce94d71345503 Mon Sep 17 00:00:00 2001 From: Anthony Date: Wed, 10 Aug 2022 05:20:04 +0100 Subject: [PATCH] feat(arabot): add dev ids in development mode --- .env.example | 1 + src/utils/devIDs.ts | 71 +++++++++++++++++++++++++++++++++++++++++++++ src/utils/ids.ts | 14 +++++++-- 3 files changed, 84 insertions(+), 2 deletions(-) create mode 100644 src/utils/devIDs.ts diff --git a/.env.example b/.env.example index 0d68079..d64f24e 100644 --- a/.env.example +++ b/.env.example @@ -3,6 +3,7 @@ DISCORD_TOKEN= # Bot token from: https://discord.com/developers/ # Configuration DEFAULT_PREFIX= # Prefix used to run commands in Discord +DEVELOPMENT= # (true/false) Enables developer mode # Docker POSTGRES_USER=USERNAME diff --git a/src/utils/devIDs.ts b/src/utils/devIDs.ts new file mode 100644 index 0000000..d259411 --- /dev/null +++ b/src/utils/devIDs.ts @@ -0,0 +1,71 @@ +// SPDX-License-Identifier: GPL-3.0-or-later +/* + Animal Rights Advocates Discord Bot + Copyright (C) 2022 Anthony Berg + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +export const devIDs = { + roles: { + trusted: '999431675081666599', + nonvegan: { + nonvegan: '999431675081666598', + vegCurious: '999431675098447932', + convinced: '999431675098447933', + }, + vegan: { + vegan: '999431675098447937', + activist: '999431675098447934', + plus: '999431675010359460', + }, + restrictions: { + sus: '999431674997788673', + muted: '999431675123597402', + restricted1: '999431674997788677', + restricted2: '999431674997788676', + restricted3: '999431674997788675', + restricted4: '999431674997788674', + }, + staff: { + coordinator: '999431675165556822', + devCoordinator: '999431675165556818', + mentorCoordinator: '999431675140382809', + verifierCoordinator: '999431675140382810', + restricted: '999431675123597407', + moderator: '999431675123597408', + verifier: '999431675123597406', + }, + patron: '999431675098447935', + patreon: '999431675098447936', + verifyingAsVegan: '999431675081666597', + }, + channels: { + staff: { + coordinators: '999431676058927254', + standup: '999431676289622183', + }, + diversity: { + women: '999431679053660187', + lgbtqia: '999431679053660188', + potgm: '999431679053660189', + disabilities: '999431679527628810', + }, + }, + categories: { + diversity: '999431679053660185', + }, +}; + +export default devIDs; diff --git a/src/utils/ids.ts b/src/utils/ids.ts index c2acb24..eab6b7b 100644 --- a/src/utils/ids.ts +++ b/src/utils/ids.ts @@ -17,7 +17,10 @@ along with this program. If not, see . */ -const IDs = { +// eslint-disable-next-line import/extensions +import devIDs from './devIDs'; + +let IDs = { roles: { trusted: '731563158011117590', nonvegan: { @@ -69,4 +72,11 @@ const IDs = { }, }; -export { IDs }; +require('dotenv').config(); + +// Check if the bot is in development mode +if (process.env.DEVELOPMENT === 'true') { + IDs = devIDs; +} + +export default { IDs };