Skip to content

Commit

Permalink
Fix Env Issue
Browse files Browse the repository at this point in the history
  • Loading branch information
DaRealFrost committed Nov 23, 2024
1 parent 77ae19a commit 454d480
Show file tree
Hide file tree
Showing 36 changed files with 107 additions and 107 deletions.
2 changes: 1 addition & 1 deletion src/common/handlers/automated_quick_support_handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const confidence_threshold = 0.75; // on a scale from <0, 1> (inclusive), how si
async function updateQuickSupportTopics() {
quick_support_topics.length = 0; // empty the array

const db_quick_support_topics_find_cursor = await go_mongo_db.find(process.env.MONGO_DATABASE_NAME as string, process.env.MONGO_QUICK_SUPPORT_TOPICS_COLLECTION_NAME as string, {});
const db_quick_support_topics_find_cursor = await go_mongo_db.find(stack.env.MONGO_DATABASE_NAME as string, stack.env.MONGO_QUICK_SUPPORT_TOPICS_COLLECTION_NAME as string, {});

const db_quick_support_topics = await db_quick_support_topics_find_cursor.toArray() as unknown as QuickSupportTopic[];

Expand Down
6 changes: 3 additions & 3 deletions src/common/handlers/code_generation/code_generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ import { verification_code_data } from './types.js';

export const codes: verification_code_data[] = [];

const db_database_name = `${process.env.MONGO_DATABASE_NAME ?? ''}`;
const db_database_name = `${stack.env.MONGO_DATABASE_NAME ?? ''}`;
if (db_database_name.length < 1) throw new Error('Environment variable: MONGO_DATABASE_NAME; is not set correctly.');

const db_products_collection_name = `${process.env.MONGO_PRODUCTS_COLLECTION_NAME ?? ''}`;
const db_products_collection_name = `${stack.env.MONGO_PRODUCTS_COLLECTION_NAME ?? ''}`;
if (db_products_collection_name.length < 1) throw new Error('Environment variable: MONGO_PRODUCTS_COLLECTION_NAME; is not set correctly.');

const db_users_collection_name = `${process.env.MONGO_USERS_COLLECTION_NAME ?? ''}`;
const db_users_collection_name = `${stack.env.MONGO_USERS_COLLECTION_NAME ?? ''}`;
if (db_users_collection_name.length < 1) throw new Error('Environment variable: MONGO_USERS_COLLECTION_NAME; is not set correctly.');

const word_array = ['white', 'black', 'source', 'copy', 'possible', 'new', 'native', 'rocks', 'apple', 'pear', 'tree', 'quackers', 'aiden', 'cole', 'cheese', 'pizza', 'man', 'transfer', 'ticket', 'products', 'alpha', 'bravo', 'charlie', 'delta', 'echo', 'foxtrot', 'golf', 'hotel', 'india', 'lima', 'mike', 'november', 'oscar', 'papa', 'romeo', 'tango', 'uniform', 'victor', 'zulu'];
Expand Down
2 changes: 1 addition & 1 deletion src/common/handlers/logs/guild_member_messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { CustomEmbed } from '@root/common/message';

//------------------------------------------------------------//

const logging_channel_id = process.env.BOT_LOGGING_CHANNEL_ID as string;
const logging_channel_id = stack.env.BOT_LOGGING_CHANNEL_ID as string;
if (typeof logging_channel_id !== 'string') throw new TypeError('logging_channel_id is not a string');

//------------------------------------------------------------//
Expand Down
2 changes: 1 addition & 1 deletion src/common/handlers/logs/guild_member_retention.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { CustomEmbed } from '@root/common/message';

//------------------------------------------------------------//

const member_retention_logging_channel_id = process.env.BOT_LOGGING_USER_RETENTION_CHANNEL_ID as string;
const member_retention_logging_channel_id = stack.env.BOT_LOGGING_USER_RETENTION_CHANNEL_ID as string;
if (typeof member_retention_logging_channel_id !== 'string') throw new TypeError('member_retention_logging_channel_id is not a string');

//------------------------------------------------------------//
Expand Down
2 changes: 1 addition & 1 deletion src/common/handlers/logs/guild_member_roles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { CustomEmbed } from '@root/common/message';

//------------------------------------------------------------//

const logging_channel_id = process.env.BOT_LOGGING_CHANNEL_ID as string;
const logging_channel_id = stack.env.BOT_LOGGING_CHANNEL_ID as string;
if (typeof logging_channel_id !== 'string') throw new TypeError('logging_channel_id is not a string');

//------------------------------------------------------------//
Expand Down
4 changes: 2 additions & 2 deletions src/common/handlers/moderation_action_handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ import { go_mongo_db } from '@root/common/mongo/mongo';

//------------------------------------------------------------//

const db_database_name = `${process.env.MONGO_DATABASE_NAME ?? ''}`;
const db_database_name = `${stack.env.MONGO_DATABASE_NAME ?? ''}`;
if (db_database_name.length < 1) throw new Error('Environment variable: MONGO_DATABASE_NAME; is not set correctly.');

const db_moderation_action_records_collection_name = `${process.env.MONGO_MODERATION_ACTION_RECORDS_COLLECTION_NAME ?? ''}`;
const db_moderation_action_records_collection_name = `${stack.env.MONGO_MODERATION_ACTION_RECORDS_COLLECTION_NAME ?? ''}`;
if (db_moderation_action_records_collection_name.length < 1) throw new Error('Environment variable: MONGO_MODERATION_ACTION_RECORDS_COLLECTION_NAME; is not set correctly.');

//------------------------------------------------------------//
Expand Down
4 changes: 2 additions & 2 deletions src/common/handlers/suggestions_category_handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { CustomEmbed } from '@root/common/message';

//------------------------------------------------------------//

const bot_staff_role_id = `${process.env.BOT_STAFF_ROLE_ID ?? ''}`;
const bot_staff_role_id = `${stack.env.BOT_STAFF_ROLE_ID ?? ''}`;
if (bot_staff_role_id.length < 1) throw new Error('Environment variable: BOT_STAFF_ROLE_ID; was not properly set or is empty');

//------------------------------------------------------------//
Expand All @@ -23,7 +23,7 @@ export async function suggestionsCategoryHandler(
if (message.content.length === 0) return;

/* don't allow staff to create suggestions */
if (message.member.roles.cache.has(process.env.BOT_STAFF_ROLE_ID as string)) return;
if (message.member.roles.cache.has(stack.env.BOT_STAFF_ROLE_ID as string)) return;

const suggestions_channel = message.channel;

Expand Down
18 changes: 9 additions & 9 deletions src/common/handlers/support_system_handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,35 +12,35 @@ import { delay, getMarkdownFriendlyTimestamp } from '@root/utilities';

//------------------------------------------------------------//

const support_tickets_category_id = `${process.env.BOT_SUPPORT_TICKETS_CATEGORY_ID ?? ''}`;
const support_tickets_category_id = `${stack.env.BOT_SUPPORT_TICKETS_CATEGORY_ID ?? ''}`;
if (support_tickets_category_id.length < 1) throw new Error('Environment variable: BOT_SUPPORT_TICKETS_CATEGORY_ID; is not set correctly.');

const support_tickets_transcripts_channel_id = `${process.env.BOT_SUPPORT_TICKETS_TRANSCRIPTS_CHANNEL_ID ?? ''}`;
const support_tickets_transcripts_channel_id = `${stack.env.BOT_SUPPORT_TICKETS_TRANSCRIPTS_CHANNEL_ID ?? ''}`;
if (support_tickets_transcripts_channel_id.length < 1) throw new Error('Environment variable: BOT_SUPPORT_TICKETS_TRANSCRIPTS_CHANNEL_ID; is not set correctly.');

//------------------------------------------------------------//

const bot_staff_role_id = `${process.env.BOT_STAFF_ROLE_ID ?? ''}`;
const bot_staff_role_id = `${stack.env.BOT_STAFF_ROLE_ID ?? ''}`;
if (bot_staff_role_id.length < 1) throw new Error('Environment variable: BOT_STAFF_ROLE_ID; is not set correctly.');

const bot_customer_service_role_id = `${process.env.BOT_CUSTOMER_SERVICE_ROLE_ID ?? ''}`;
const bot_customer_service_role_id = `${stack.env.BOT_CUSTOMER_SERVICE_ROLE_ID ?? ''}`;
if (bot_customer_service_role_id.length < 1) throw new Error('Environment variable: BOT_CUSTOMER_SERVICE_ROLE_ID; is not set correctly.');

//------------------------------------------------------------//

const bot_database_support_staff_role_id = `${process.env.BOT_SUPPORT_STAFF_DATABASE_ROLE_ID ?? ''}`;
const bot_database_support_staff_role_id = `${stack.env.BOT_SUPPORT_STAFF_DATABASE_ROLE_ID ?? ''}`;
if (bot_database_support_staff_role_id.length < 1) throw new Error('Environment variable: BOT_SUPPORT_STAFF_DATABASE_ROLE_ID; is not set correctly.');

const bot_other_support_staff_role_id = `${process.env.BOT_SUPPORT_STAFF_OTHER_ROLE_ID ?? ''}`;
const bot_other_support_staff_role_id = `${stack.env.BOT_SUPPORT_STAFF_OTHER_ROLE_ID ?? ''}`;
if (bot_other_support_staff_role_id.length < 1) throw new Error('Environment variable: BOT_SUPPORT_STAFF_OTHER_ROLE_ID; is not set correctly.');

const bot_product_issues_support_staff_role_id = `${process.env.BOT_SUPPORT_STAFF_PRODUCT_ISSUES_ROLE_ID ?? ''}`;
const bot_product_issues_support_staff_role_id = `${stack.env.BOT_SUPPORT_STAFF_PRODUCT_ISSUES_ROLE_ID ?? ''}`;
if (bot_product_issues_support_staff_role_id.length < 1) throw new Error('Environment variable: BOT_SUPPORT_STAFF_PRODUCT_ISSUES_ROLE_ID; is not set correctly.');

const bot_product_purchases_support_staff_role_id = `${process.env.BOT_SUPPORT_STAFF_PRODUCT_PURCHASES_ROLE_ID ?? ''}`;
const bot_product_purchases_support_staff_role_id = `${stack.env.BOT_SUPPORT_STAFF_PRODUCT_PURCHASES_ROLE_ID ?? ''}`;
if (bot_product_purchases_support_staff_role_id.length < 1) throw new Error('Environment variable: BOT_SUPPORT_STAFF_PRODUCT_PURCHASES_ROLE_ID; is not set correctly.');

const bot_partnership_requests_support_staff_role_id = `${process.env.BOT_SUPPORT_STAFF_PARTNERSHIP_REQUESTS_ROLE_ID ?? ''}`;
const bot_partnership_requests_support_staff_role_id = `${stack.env.BOT_SUPPORT_STAFF_PARTNERSHIP_REQUESTS_ROLE_ID ?? ''}`;
if (bot_partnership_requests_support_staff_role_id.length < 1) throw new Error('Environment variable: BOT_SUPPORT_STAFF_PARTNERSHIP_REQUESTS_ROLE_ID; is not set correctly.');

//------------------------------------------------------------//
Expand Down
12 changes: 6 additions & 6 deletions src/common/handlers/user_notes_handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ async function createNoteForUser(
const record_id = uuid_v4();

try {
await go_mongo_db.add(process.env.MONGO_DATABASE_NAME as string, process.env.MONGO_USER_NOTES_COLLECTION_NAME as string, [
await go_mongo_db.add(stack.env.MONGO_DATABASE_NAME as string, stack.env.MONGO_USER_NOTES_COLLECTION_NAME as string, [
{
'identity': {
'discord_user_id': discord_user_id,
Expand Down Expand Up @@ -83,7 +83,7 @@ async function updateNoteForUser(
if (typeof staff_member_id !== 'string') throw new TypeError('\`staff_member_id\` must be a string!');

try {
await go_mongo_db.update(process.env.MONGO_DATABASE_NAME as string, process.env.MONGO_USER_NOTES_COLLECTION_NAME as string, {
await go_mongo_db.update(stack.env.MONGO_DATABASE_NAME as string, stack.env.MONGO_USER_NOTES_COLLECTION_NAME as string, {
'record.id': id,
}, {
$set: {
Expand Down Expand Up @@ -115,7 +115,7 @@ async function removeNoteFromUser(
if (typeof id !== 'string') throw new TypeError('\`id\` must be a string!');

try {
await go_mongo_db.remove(process.env.MONGO_DATABASE_NAME as string, process.env.MONGO_USER_NOTES_COLLECTION_NAME as string, {
await go_mongo_db.remove(stack.env.MONGO_DATABASE_NAME as string, stack.env.MONGO_USER_NOTES_COLLECTION_NAME as string, {
'record.id': id,
});
} catch (error) {
Expand All @@ -137,7 +137,7 @@ async function purgeNotesFromUser(
if (typeof discord_user_id !== 'string') throw new TypeError('\`discord_user_id\` must be a string!');

try {
await go_mongo_db.remove(process.env.MONGO_DATABASE_NAME as string, process.env.MONGO_USER_NOTES_COLLECTION_NAME as string, {
await go_mongo_db.remove(stack.env.MONGO_DATABASE_NAME as string, stack.env.MONGO_USER_NOTES_COLLECTION_NAME as string, {
'identity.discord_user_id': discord_user_id,
});
} catch (error) {
Expand All @@ -158,7 +158,7 @@ async function lookupNotesForUser(
): Promise<UserNote[]> {
if (typeof discord_user_id !== 'string') throw new TypeError('\`discord_user_id\` must be a string!');

const user_notes_find_cursor = await go_mongo_db.find(process.env.MONGO_DATABASE_NAME as string, process.env.MONGO_USER_NOTES_COLLECTION_NAME as string, {
const user_notes_find_cursor = await go_mongo_db.find(stack.env.MONGO_DATABASE_NAME as string, stack.env.MONGO_USER_NOTES_COLLECTION_NAME as string, {
'identity.discord_user_id': discord_user_id,
});

Expand All @@ -177,7 +177,7 @@ async function lookupNoteForUser(
): Promise<UserNote | null> {
if (typeof id !== 'string') throw new TypeError('\`id\` must be a string!');

const user_notes_find_cursor = await go_mongo_db.find(process.env.MONGO_DATABASE_NAME as string, process.env.MONGO_USER_NOTES_COLLECTION_NAME as string, {
const user_notes_find_cursor = await go_mongo_db.find(stack.env.MONGO_DATABASE_NAME as string, stack.env.MONGO_USER_NOTES_COLLECTION_NAME as string, {
'record.id': id,
});

Expand Down
20 changes: 10 additions & 10 deletions src/common/handlers/user_profile_handler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,26 @@ import { dbUserArray } from './user_data/user_data_handler';

//------------------------------------------------------------//

const db_database_name = `${process.env.MONGO_DATABASE_NAME ?? ''}`;
const db_database_name = `${stack.env.MONGO_DATABASE_NAME ?? ''}`;
if (db_database_name.length < 1) throw new Error('Environment variable: MONGO_DATABASE_NAME; is not set correctly.');

const db_products_collection_name = `${process.env.MONGO_PRODUCTS_COLLECTION_NAME ?? ''}`;
const db_products_collection_name = `${stack.env.MONGO_PRODUCTS_COLLECTION_NAME ?? ''}`;
if (db_products_collection_name.length < 1) throw new Error('Environment variable: MONGO_PRODUCTS_COLLECTION_NAME; is not set correctly.');

const db_users_collection_name = `${process.env.MONGO_USERS_COLLECTION_NAME ?? ''}`;
const db_users_collection_name = `${stack.env.MONGO_USERS_COLLECTION_NAME ?? ''}`;
if (db_users_collection_name.length < 1) throw new Error('Environment variable: MONGO_USERS_COLLECTION_NAME; is not set correctly.');

const db_blacklisted_users_collection_name = `${process.env.MONGO_BLACKLISTED_USERS_COLLECTION_NAME ?? ''}`;
const db_blacklisted_users_collection_name = `${stack.env.MONGO_BLACKLISTED_USERS_COLLECTION_NAME ?? ''}`;
if (db_blacklisted_users_collection_name.length < 1) throw new Error('Environment variable: MONGO_BLACKLISTED_USERS_COLLECTION_NAME; is not set correctly.');

const bot_partners_role_id = `${process.env.BOT_PARTNERS_ROLE_ID ?? ''}`;
if (bot_partners_role_id.length < 1) throw new Error('\'process.env.BOT_PARTNERS_ROLE_ID\' is not defined or is empty');
const bot_partners_role_id = `${stack.env.BOT_PARTNERS_ROLE_ID ?? ''}`;
if (bot_partners_role_id.length < 1) throw new Error('\'stack.env.BOT_PARTNERS_ROLE_ID\' is not defined or is empty');

const bot_staff_products_role_id = `${process.env.BOT_STAFF_PRODUCTS_ROLE_ID ?? ''}`;
if (bot_staff_products_role_id.length < 1) throw new Error('\'process.env.BOT_STAFF_PRODUCTS_ROLE_ID\' is not defined or is empty');
const bot_staff_products_role_id = `${stack.env.BOT_STAFF_PRODUCTS_ROLE_ID ?? ''}`;
if (bot_staff_products_role_id.length < 1) throw new Error('\'stack.env.BOT_STAFF_PRODUCTS_ROLE_ID\' is not defined or is empty');

const bot_subscriptions_tier_1_role_id = `${process.env.BOT_SUBSCRIPTIONS_TIER_1_ROLE_ID ?? ''}`;
if (bot_subscriptions_tier_1_role_id.length < 1) throw new Error('\'process.env.BOT_SUBSCRIPTIONS_TIER_1_ROLE_ID\' is not defined or is empty');
const bot_subscriptions_tier_1_role_id = `${stack.env.BOT_SUBSCRIPTIONS_TIER_1_ROLE_ID ?? ''}`;
if (bot_subscriptions_tier_1_role_id.length < 1) throw new Error('\'stack.env.BOT_SUBSCRIPTIONS_TIER_1_ROLE_ID\' is not defined or is empty');

//------------------------------------------------------------//

Expand Down
16 changes: 8 additions & 8 deletions src/common/managers/custom_interactions_manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,28 @@ import { fetchHighestAccessLevelForUser } from '@root/common/permissions';

//------------------------------------------------------------//

const bot_guild_id = `${process.env.BOT_GUILD_ID ?? ''}`;
const bot_guild_id = `${stack.env.BOT_GUILD_ID ?? ''}`;
if (bot_guild_id.length < 1) throw new Error('Environment variable: BOT_GUILD_ID; was not set correctly!');

const bot_staff_guild_id = `${process.env.BOT_STAFF_GUILD_ID ?? ''}`;
const bot_staff_guild_id = `${stack.env.BOT_STAFF_GUILD_ID ?? ''}`;
if (bot_staff_guild_id.length < 1) throw new Error('Environment variable: BOT_STAFF_GUILD_ID; was not set correctly!');

const guild_staff_role_id = `${process.env.BOT_STAFF_ROLE_ID ?? ''}`;
const guild_staff_role_id = `${stack.env.BOT_STAFF_ROLE_ID ?? ''}`;
if (guild_staff_role_id.length < 1) throw new Error('Environment variable: BOT_STAFF_ROLE_ID; was not set correctly!');

const guild_customer_service_role_id = `${process.env.BOT_CUSTOMER_SERVICE_ROLE_ID ?? ''}`;
const guild_customer_service_role_id = `${stack.env.BOT_CUSTOMER_SERVICE_ROLE_ID ?? ''}`;
if (guild_customer_service_role_id.length < 1) throw new Error('Environment variable: BOT_CUSTOMER_SERVICE_ROLE_ID; was not set correctly!');

const guild_moderators_role_id = `${process.env.BOT_MODERATOR_ROLE_ID ?? ''}`;
const guild_moderators_role_id = `${stack.env.BOT_MODERATOR_ROLE_ID ?? ''}`;
if (guild_moderators_role_id.length < 1) throw new Error('Environment variable: BOT_MODERATOR_ROLE_ID; was not set correctly!');

const guild_admins_role_id = `${process.env.BOT_ADMIN_ROLE_ID ?? ''}`;
const guild_admins_role_id = `${stack.env.BOT_ADMIN_ROLE_ID ?? ''}`;
if (guild_admins_role_id.length < 1) throw new Error('Environment variable: BOT_ADMIN_ROLE_ID; was not set correctly!');

const guild_team_leaders_role_id = `${process.env.BOT_TEAM_LEADERS_ROLE_ID ?? ''}`;
const guild_team_leaders_role_id = `${stack.env.BOT_TEAM_LEADERS_ROLE_ID ?? ''}`;
if (guild_team_leaders_role_id.length < 1) throw new Error('Environment variable: BOT_TEAM_LEADERS_ROLE_ID; was not set correctly!');

const guild_company_management_role_id = `${process.env.BOT_COMPANY_MANAGEMENT_ROLE_ID ?? ''}`;
const guild_company_management_role_id = `${stack.env.BOT_COMPANY_MANAGEMENT_ROLE_ID ?? ''}`;
if (guild_company_management_role_id.length < 1) throw new Error('Environment variable: BOT_COMPANY_MANAGEMENT_ROLE_ID; was not set correctly!');

//------------------------------------------------------------//
Expand Down
2 changes: 1 addition & 1 deletion src/common/mongo/mongo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { GoMongoDb } from 'go-mongo-db';

//------------------------------------------------------------//

const mongo_connection_url = `${process.env.MONGO_CONNECTION_URL ?? ''}`;
const mongo_connection_url = `${stack.env.MONGO_CONNECTION_URL ?? ''}`;
if (mongo_connection_url.length < 1) throw new Error('environment variable: MONGO_CONNECTION_URL; was not properly set or is empty');

//------------------------------------------------------------//
Expand Down
16 changes: 8 additions & 8 deletions src/common/permissions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,28 +8,28 @@ import { CustomInteractionAccessLevel } from '@root/common/managers/custom_inter

//------------------------------------------------------------//

const bot_guild_id = `${process.env.BOT_GUILD_ID ?? ''}`;
const bot_guild_id = `${stack.env.BOT_GUILD_ID ?? ''}`;
if (bot_guild_id.length < 1) throw new Error('Environment variable: BOT_GUILD_ID; was not set correctly!');

const guild_staff_role_id = `${process.env.BOT_STAFF_ROLE_ID ?? ''}`;
const guild_staff_role_id = `${stack.env.BOT_STAFF_ROLE_ID ?? ''}`;
if (guild_staff_role_id.length < 1) throw new Error('Environment variable: BOT_STAFF_ROLE_ID; was not set correctly!');

const guild_customer_service_role_id = `${process.env.BOT_CUSTOMER_SERVICE_ROLE_ID ?? ''}`;
const guild_customer_service_role_id = `${stack.env.BOT_CUSTOMER_SERVICE_ROLE_ID ?? ''}`;
if (guild_customer_service_role_id.length < 1) throw new Error('Environment variable: BOT_CUSTOMER_SERVICE_ROLE_ID; was not set correctly!');

const guild_moderators_role_id = `${process.env.BOT_MODERATOR_ROLE_ID ?? ''}`;
const guild_moderators_role_id = `${stack.env.BOT_MODERATOR_ROLE_ID ?? ''}`;
if (guild_moderators_role_id.length < 1) throw new Error('Environment variable: BOT_MODERATOR_ROLE_ID; was not set correctly!');

const guild_admins_role_id = `${process.env.BOT_ADMIN_ROLE_ID ?? ''}`;
const guild_admins_role_id = `${stack.env.BOT_ADMIN_ROLE_ID ?? ''}`;
if (guild_admins_role_id.length < 1) throw new Error('Environment variable: BOT_ADMIN_ROLE_ID; was not set correctly!');

const guild_team_leaders_role_id = `${process.env.BOT_TEAM_LEADERS_ROLE_ID ?? ''}`;
const guild_team_leaders_role_id = `${stack.env.BOT_TEAM_LEADERS_ROLE_ID ?? ''}`;
if (guild_team_leaders_role_id.length < 1) throw new Error('Environment variable: BOT_TEAM_LEADERS_ROLE_ID; was not set correctly!');

const guild_company_management_role_id = `${process.env.BOT_COMPANY_MANAGEMENT_ROLE_ID ?? ''}`;
const guild_company_management_role_id = `${stack.env.BOT_COMPANY_MANAGEMENT_ROLE_ID ?? ''}`;
if (guild_company_management_role_id.length < 1) throw new Error('Environment variable: BOT_COMPANY_MANAGEMENT_ROLE_ID; was not set correctly!');

const guild_bot_admin_role_id = `${process.env.BOT_BOT_ADMIN_ROLE_ID ?? ''}`;
const guild_bot_admin_role_id = `${stack.env.BOT_BOT_ADMIN_ROLE_ID ?? ''}`;
if (guild_company_management_role_id.length < 1) throw new Error('Environment variable: BOT_BOT_ADMIN_ROLE_ID; was not set correctly!');

//------------------------------------------------------------//
Expand Down
Loading

0 comments on commit 454d480

Please sign in to comment.