feat: simplified discord token and wargaming application id fetching

This commit is contained in:
TresAbhi committed 2023-06-08 00:39:42 +00:00
1 parent dd900fdf95
commit 3a23a3f8c4
17 files changed
+50 -47

No files matched your search

+2 -2
View File
@@ -15,7 +15,7 @@ import {
import { readdirSync } from 'fs';
import discord from '../../discord.json' assert { type: 'json' };
import negativeEmbed from '../core/interaction/negativeEmbed.js';
import { args } from '../core/process/args.js';
import { discordToken } from '../core/process/args.js';
import getClientId from '../core/process/getClientId.js';
import isDev from '../core/process/isDev.js';
import { handleError } from './error.js';
@@ -30,7 +30,7 @@ export interface CommandRegistry {
autocomplete?: (interaction: AutocompleteInteraction<CacheType>) => void;
}
const rest = new REST().setToken(args['discord-token']);
const rest = new REST().setToken(discordToken);
const commandFolders = readdirSync('src/commands/');
const commandCollection = new Collection<string, CommandRegistry>();