From 4be7852bf39ce7ac17ec457a4c3b40900668546e Mon Sep 17 00:00:00 2001 From: tresabhi Date: Mon, 12 Jun 2023 01:17:26 +0000 Subject: [PATCH] feat: tokens and ids naming convention --- src/commands/eligible.ts | 4 ++-- src/commands/inactive.tsx | 6 +++--- src/commands/ownedtanks.tsx | 6 +++--- src/commands/playerachievements.ts | 6 +++--- src/commands/playerinfo.ts | 4 ++-- src/commands/searchclans.ts | 4 ++-- src/commands/searchplayers.ts | 4 ++-- src/commands/stats.tsx | 6 +++--- src/commands/tankstats.tsx | 4 ++-- src/commands/today.tsx | 6 +++--- src/commands/verify.ts | 6 +++--- src/core/blitz/getTankStats.ts | 4 ++-- src/core/blitz/listAccountsPanServer.ts | 8 ++++---- src/core/blitz/listClansPanServer.ts | 8 ++++---- src/core/process/args.ts | 8 ++++---- src/events/interactionCreate.ts | 4 ++-- src/index.ts | 4 ++-- 17 files changed, 46 insertions(+), 46 deletions(-) diff --git a/src/commands/eligible.ts b/src/commands/eligible.ts index 934f80c1b..f6a65bd33 100644 --- a/src/commands/eligible.ts +++ b/src/commands/eligible.ts @@ -13,7 +13,7 @@ import cmdName from '../core/interaction/cmdName.js'; import negativeEmbed from '../core/interaction/negativeEmbed.js'; import positiveEmbed from '../core/interaction/positiveEmbed.js'; import addUsernameOption from '../core/options/addUsernameOption.js'; -import { wargamingApplicationId } from '../core/process/args.js'; +import { WARGAMING_APPLICATION_ID } from '../core/process/args.js'; import { CommandRegistry } from '../events/interactionCreate.js'; import { AccountInfo } from '../types/accountInfo.js'; @@ -51,7 +51,7 @@ export default { const clan = interaction.options.getString('clan') as SkilledClan; const { id, server } = await getBlitzAccount(interaction); const accountInfo = await getWargamingResponse( - `https://api.wotblitz.${server}/wotb/account/info/?application_id=${wargamingApplicationId}&account_id=${id}`, + `https://api.wotblitz.${server}/wotb/account/info/?application_id=${WARGAMING_APPLICATION_ID}&account_id=${id}`, ); const problems: TableInput = []; const title = `${accountInfo[id].nickname}'s eligibility for ${SKILLED_CLANS[clan]}`; diff --git a/src/commands/inactive.tsx b/src/commands/inactive.tsx index ddca68934..9b91fa8eb 100644 --- a/src/commands/inactive.tsx +++ b/src/commands/inactive.tsx @@ -10,7 +10,7 @@ import getBlitzClan from '../core/blitz/getBlitzClan.js'; import getWargamingResponse from '../core/blitz/getWargamingResponse.js'; import cmdName from '../core/interaction/cmdName.js'; import addClanChoices from '../core/options/addClanChoices.js'; -import { wargamingApplicationId } from '../core/process/args.js'; +import { WARGAMING_APPLICATION_ID } from '../core/process/args.js'; import render from '../core/ui/render.js'; import { CommandRegistry } from '../events/interactionCreate.js'; import { AccountInfo } from '../types/accountInfo.js'; @@ -44,12 +44,12 @@ export default { const time = new Date().getTime() / 1000; const clanData = ( await getWargamingResponse( - `https://api.wotblitz.${server}/wotb/clans/info/?application_id=${wargamingApplicationId}&clan_id=${id}`, + `https://api.wotblitz.${server}/wotb/clans/info/?application_id=${WARGAMING_APPLICATION_ID}&clan_id=${id}`, ) )[id]; const memberIds = clanData.members_ids; const accounts = await getWargamingResponse( - `https://api.wotblitz.${server}/wotb/account/info/?application_id=${wargamingApplicationId}&account_id=${memberIds.join( + `https://api.wotblitz.${server}/wotb/account/info/?application_id=${WARGAMING_APPLICATION_ID}&account_id=${memberIds.join( ',', )}`, ); diff --git a/src/commands/ownedtanks.tsx b/src/commands/ownedtanks.tsx index 1eb80b433..98df0be0f 100644 --- a/src/commands/ownedtanks.tsx +++ b/src/commands/ownedtanks.tsx @@ -12,7 +12,7 @@ import getWargamingResponse from '../core/blitz/getWargamingResponse.js'; import { TIER_ROMAN_NUMERALS, tankopedia } from '../core/blitz/tankopedia.js'; import cmdName from '../core/interaction/cmdName.js'; import addUsernameOption from '../core/options/addUsernameOption.js'; -import { wargamingApplicationId } from '../core/process/args.js'; +import { WARGAMING_APPLICATION_ID } from '../core/process/args.js'; import render from '../core/ui/render.js'; import { CommandRegistry } from '../events/interactionCreate.js'; import { AccountInfo } from '../types/accountInfo.js'; @@ -62,14 +62,14 @@ export default { const account = await getBlitzAccount(interaction); const { id, server } = account; const accountInfo = await getWargamingResponse( - `https://api.wotblitz.${server}/wotb/account/info/?application_id=${wargamingApplicationId}&account_id=${id}`, + `https://api.wotblitz.${server}/wotb/account/info/?application_id=${WARGAMING_APPLICATION_ID}&account_id=${id}`, ); const tankStats = await getTankStats(interaction, server, id); const tanks = tankStats .map((tankData) => tankopedia[tankData.tank_id]) .filter((tank) => tank?.tier === tier); const clanData = await getWargamingResponse( - `https://api.wotblitz.${server}/wotb/clans/accountinfo/?application_id=${wargamingApplicationId}&account_id=${id}&extra=clan`, + `https://api.wotblitz.${server}/wotb/clans/accountinfo/?application_id=${WARGAMING_APPLICATION_ID}&account_id=${id}&extra=clan`, ); const image = await render( diff --git a/src/commands/playerachievements.ts b/src/commands/playerachievements.ts index ed865dc40..cbe3626fd 100644 --- a/src/commands/playerachievements.ts +++ b/src/commands/playerachievements.ts @@ -8,7 +8,7 @@ import cleanTable, { TableInputEntry } from '../core/interaction/cleanTable.js'; import cmdName from '../core/interaction/cmdName.js'; import infoEmbed from '../core/interaction/infoEmbed.js'; import addUsernameOption from '../core/options/addUsernameOption.js'; -import { wargamingApplicationId } from '../core/process/args.js'; +import { WARGAMING_APPLICATION_ID } from '../core/process/args.js'; import { CommandRegistry } from '../events/interactionCreate.js'; import { AccountAchievements } from '../types/accountAchievements.js'; import { AccountInfo } from '../types/accountInfo.js'; @@ -39,11 +39,11 @@ export default { const account = await getBlitzAccount(interaction); const { id, server } = account; const accounts = await getWargamingResponse( - `https://api.wotblitz.${server}/wotb/account/info/?application_id=${wargamingApplicationId}&account_id=${id}`, + `https://api.wotblitz.${server}/wotb/account/info/?application_id=${WARGAMING_APPLICATION_ID}&account_id=${id}`, ); const accountsAchievements = await getWargamingResponse( - `https://api.wotblitz.${server}/wotb/account/achievements/?application_id=${wargamingApplicationId}&account_id=${id}`, + `https://api.wotblitz.${server}/wotb/account/achievements/?application_id=${WARGAMING_APPLICATION_ID}&account_id=${id}`, ); const accountAchievements = accountsAchievements[id]; const compound = { diff --git a/src/commands/playerinfo.ts b/src/commands/playerinfo.ts index a6f91953e..46a3eefb8 100644 --- a/src/commands/playerinfo.ts +++ b/src/commands/playerinfo.ts @@ -7,7 +7,7 @@ import cleanTable from '../core/interaction/cleanTable.js'; import cmdName from '../core/interaction/cmdName.js'; import infoEmbed from '../core/interaction/infoEmbed.js'; import addUsernameOption from '../core/options/addUsernameOption.js'; -import { wargamingApplicationId } from '../core/process/args.js'; +import { WARGAMING_APPLICATION_ID } from '../core/process/args.js'; import { CommandRegistry } from '../events/interactionCreate.js'; import { AccountInfo } from '../types/accountInfo.js'; @@ -25,7 +25,7 @@ export default { const account = await getBlitzAccount(interaction); const { id, server } = account; const accounts = await getWargamingResponse( - `https://api.wotblitz.${server}/wotb/account/info/?application_id=${wargamingApplicationId}&account_id=${id}`, + `https://api.wotblitz.${server}/wotb/account/info/?application_id=${WARGAMING_APPLICATION_ID}&account_id=${id}`, ); const accountInfo = accounts[id]; diff --git a/src/commands/searchclans.ts b/src/commands/searchclans.ts index 3b6a50345..28216932d 100644 --- a/src/commands/searchclans.ts +++ b/src/commands/searchclans.ts @@ -6,7 +6,7 @@ import cmdName from '../core/interaction/cmdName.js'; import infoEmbed from '../core/interaction/infoEmbed.js'; import addClanChoices from '../core/options/addClanChoices.js'; import addServerChoices from '../core/options/addServerChoices.js'; -import { wargamingApplicationId } from '../core/process/args.js'; +import { WARGAMING_APPLICATION_ID } from '../core/process/args.js'; import { CommandRegistry } from '../events/interactionCreate.js'; import { ClanList } from '../types/clanList.js'; @@ -33,7 +33,7 @@ export default { const clan = interaction.options.getString('clan')!; const limit = interaction.options.getInteger('limit') ?? 25; const clanList = await getWargamingResponse( - `https://api.wotblitz.${server}/wotb/clans/list/?application_id=${wargamingApplicationId}&search=${clan}&limit=${limit}`, + `https://api.wotblitz.${server}/wotb/clans/list/?application_id=${WARGAMING_APPLICATION_ID}&search=${clan}&limit=${limit}`, ); await interaction.editReply({ diff --git a/src/commands/searchplayers.ts b/src/commands/searchplayers.ts index 83bc9ae79..1f29125e5 100644 --- a/src/commands/searchplayers.ts +++ b/src/commands/searchplayers.ts @@ -7,7 +7,7 @@ import cmdName from '../core/interaction/cmdName.js'; import infoEmbed from '../core/interaction/infoEmbed.js'; import addServerChoices from '../core/options/addServerChoices.js'; import addUsernameOption from '../core/options/addUsernameOption.js'; -import { wargamingApplicationId } from '../core/process/args.js'; +import { WARGAMING_APPLICATION_ID } from '../core/process/args.js'; import { CommandRegistry } from '../events/interactionCreate.js'; import { AccountList } from '../types/accountList.js'; @@ -38,7 +38,7 @@ export default { const trimmedSearch = name.trim(); const players = usernamePattern.test(trimmedSearch) ? await getWargamingResponse( - `https://api.wotblitz.${server}/wotb/account/list/?application_id=${wargamingApplicationId}&search=${encodeURIComponent( + `https://api.wotblitz.${server}/wotb/account/list/?application_id=${WARGAMING_APPLICATION_ID}&search=${encodeURIComponent( trimmedSearch, )}&limit=${limit}`, ) diff --git a/src/commands/stats.tsx b/src/commands/stats.tsx index 947eeba37..9939e2c20 100644 --- a/src/commands/stats.tsx +++ b/src/commands/stats.tsx @@ -28,7 +28,7 @@ import addStatPeriodChoices, { statPeriodNames, } from '../core/options/addStatPeriodChoices.js'; import addUsernameOption from '../core/options/addUsernameOption.js'; -import { wargamingApplicationId } from '../core/process/args.js'; +import { WARGAMING_APPLICATION_ID } from '../core/process/args.js'; import render from '../core/ui/render.js'; import { CommandRegistry } from '../events/interactionCreate.js'; import { @@ -53,10 +53,10 @@ export default { const period = interaction.options.getString('period') as StatPeriod; const { id, server } = await getBlitzAccount(interaction); const accountInfo = await getWargamingResponse( - `https://api.wotblitz.${server}/wotb/account/info/?application_id=${wargamingApplicationId}&account_id=${id}`, + `https://api.wotblitz.${server}/wotb/account/info/?application_id=${WARGAMING_APPLICATION_ID}&account_id=${id}`, ); const clanData = await getWargamingResponse( - `https://api.wotblitz.${server}/wotb/clans/accountinfo/?application_id=${wargamingApplicationId}&account_id=${id}&extra=clan`, + `https://api.wotblitz.${server}/wotb/clans/accountinfo/?application_id=${WARGAMING_APPLICATION_ID}&account_id=${id}&extra=clan`, ); const tankStats = await getTankStats(interaction, server, id); let stats: AllStats; diff --git a/src/commands/tankstats.tsx b/src/commands/tankstats.tsx index e1844b937..baae75a9c 100644 --- a/src/commands/tankstats.tsx +++ b/src/commands/tankstats.tsx @@ -33,7 +33,7 @@ import addStatPeriodChoices, { } from '../core/options/addStatPeriodChoices.js'; import addTankChoices from '../core/options/addTankChoices.js'; import addUsernameOption from '../core/options/addUsernameOption.js'; -import { wargamingApplicationId } from '../core/process/args.js'; +import { WARGAMING_APPLICATION_ID } from '../core/process/args.js'; import render from '../core/ui/render.js'; import { CommandRegistry } from '../events/interactionCreate.js'; import { AccountInfo, AllStats } from '../types/accountInfo.js'; @@ -59,7 +59,7 @@ export default { const blitzAccount = await getBlitzAccount(interaction); const { id, server } = blitzAccount; const accountInfo = await getWargamingResponse( - `https://api.wotblitz.${server}/wotb/account/info/?application_id=${wargamingApplicationId}&account_id=${id}`, + `https://api.wotblitz.${server}/wotb/account/info/?application_id=${WARGAMING_APPLICATION_ID}&account_id=${id}`, ); const tankStats = await getTankStats(interaction, server, id); let stats: AllStats; diff --git a/src/commands/today.tsx b/src/commands/today.tsx index 8aab43f1d..887e3f27a 100644 --- a/src/commands/today.tsx +++ b/src/commands/today.tsx @@ -24,7 +24,7 @@ import cmdName from '../core/interaction/cmdName.js'; import fullBlitzStarsStats from '../core/interaction/fullBlitzStarsStats.js'; import { supportBlitzStars } from '../core/interaction/supportBlitzStars.js'; import addUsernameOption from '../core/options/addUsernameOption.js'; -import { wargamingApplicationId } from '../core/process/args.js'; +import { WARGAMING_APPLICATION_ID } from '../core/process/args.js'; import render from '../core/ui/render.js'; import { CommandRegistry } from '../events/interactionCreate.js'; import { AccountInfo, AllStats } from '../types/accountInfo.js'; @@ -50,10 +50,10 @@ export default { new Date().getTime() / 1000, ); const accountInfo = await getWargamingResponse( - `https://api.wotblitz.${server}/wotb/account/info/?application_id=${wargamingApplicationId}&account_id=${id}`, + `https://api.wotblitz.${server}/wotb/account/info/?application_id=${WARGAMING_APPLICATION_ID}&account_id=${id}`, ); const clanData = await getWargamingResponse( - `https://api.wotblitz.${server}/wotb/clans/accountinfo/?application_id=${wargamingApplicationId}&account_id=${id}&extra=clan`, + `https://api.wotblitz.${server}/wotb/clans/accountinfo/?application_id=${WARGAMING_APPLICATION_ID}&account_id=${id}&extra=clan`, ); const careerTankStatsRaw = await getTankStats(interaction, server, id); const careerStats: Record = { diff --git a/src/commands/verify.ts b/src/commands/verify.ts index b88566c6b..7fbfdeabc 100644 --- a/src/commands/verify.ts +++ b/src/commands/verify.ts @@ -7,7 +7,7 @@ import getBlitzAccount from '../core/blitz/getBlitzAccount.js'; import getWargamingResponse from '../core/blitz/getWargamingResponse.js'; import cmdName from '../core/interaction/cmdName.js'; import addUsernameOption from '../core/options/addUsernameOption.js'; -import { wargamingApplicationId } from '../core/process/args.js'; +import { WARGAMING_APPLICATION_ID } from '../core/process/args.js'; import { CommandRegistry } from '../events/interactionCreate.js'; import { AccountInfo } from '../types/accountInfo.js'; import { PlayerClanData } from '../types/playerClanData.js'; @@ -26,10 +26,10 @@ export default { const blitzAccount = await getBlitzAccount(interaction); const { id, server } = blitzAccount; const accountInfo = await getWargamingResponse( - `https://api.wotblitz.${server}/wotb/account/info/?application_id=${wargamingApplicationId}&account_id=${id}`, + `https://api.wotblitz.${server}/wotb/account/info/?application_id=${WARGAMING_APPLICATION_ID}&account_id=${id}`, ); const clanData = await getWargamingResponse( - `https://api.wotblitz.${server}/wotb/clans/accountinfo/?application_id=${wargamingApplicationId}&account_id=${id}&extra=clan`, + `https://api.wotblitz.${server}/wotb/clans/accountinfo/?application_id=${WARGAMING_APPLICATION_ID}&account_id=${id}&extra=clan`, ); const clan = clanData[id]?.clan; const clanTag = clan ? ` [${clan!.tag}]` : ''; diff --git a/src/core/blitz/getTankStats.ts b/src/core/blitz/getTankStats.ts index 912dbce02..334dfbc23 100644 --- a/src/core/blitz/getTankStats.ts +++ b/src/core/blitz/getTankStats.ts @@ -1,7 +1,7 @@ import { CacheType, ChatInputCommandInteraction } from 'discord.js'; import { BLITZ_SERVERS, BlitzServer } from '../../constants/servers.js'; import { TanksStats } from '../../types/tanksStats.js'; -import { wargamingApplicationId } from '../process/args.js'; +import { WARGAMING_APPLICATION_ID } from '../process/args.js'; import errorWithCause from '../process/errorWithCause.js'; import getWargamingResponse from './getWargamingResponse.js'; @@ -11,7 +11,7 @@ export default async function getTankStats( id: number, ) { const tankStats = await getWargamingResponse( - `https://api.wotblitz.${server}/wotb/tanks/stats/?application_id=${wargamingApplicationId}&account_id=${id}`, + `https://api.wotblitz.${server}/wotb/tanks/stats/?application_id=${WARGAMING_APPLICATION_ID}&account_id=${id}`, ); if (tankStats[id] === null) { diff --git a/src/core/blitz/listAccountsPanServer.ts b/src/core/blitz/listAccountsPanServer.ts index b868eb8a5..f09069ba7 100644 --- a/src/core/blitz/listAccountsPanServer.ts +++ b/src/core/blitz/listAccountsPanServer.ts @@ -1,6 +1,6 @@ import { BlitzServer } from '../../constants/servers.js'; import { Account, AccountList } from '../../types/accountList.js'; -import { wargamingApplicationId } from '../process/args.js'; +import { WARGAMING_APPLICATION_ID } from '../process/args.js'; import getWargamingResponse from './getWargamingResponse.js'; export type AccountListWithServer = (Account & { @@ -19,7 +19,7 @@ export default async function listAccountsPanServer(search: string, limit = 9) { return ( await Promise.all([ getWargamingResponse( - `https://api.wotblitz.com/wotb/account/list/?application_id=${wargamingApplicationId}&search=${encodedSearch}&limit=${normalizedLimit}`, + `https://api.wotblitz.com/wotb/account/list/?application_id=${WARGAMING_APPLICATION_ID}&search=${encodedSearch}&limit=${normalizedLimit}`, ).then( (value) => value && @@ -29,7 +29,7 @@ export default async function listAccountsPanServer(search: string, limit = 9) { })), ), getWargamingResponse( - `https://api.wotblitz.eu/wotb/account/list/?application_id=${wargamingApplicationId}&search=${encodedSearch}&limit=${normalizedLimit}`, + `https://api.wotblitz.eu/wotb/account/list/?application_id=${WARGAMING_APPLICATION_ID}&search=${encodedSearch}&limit=${normalizedLimit}`, ).then( (value) => value && @@ -39,7 +39,7 @@ export default async function listAccountsPanServer(search: string, limit = 9) { })), ), getWargamingResponse( - `https://api.wotblitz.asia/wotb/account/list/?application_id=${wargamingApplicationId}&search=${encodedSearch}&limit=${normalizedLimit}`, + `https://api.wotblitz.asia/wotb/account/list/?application_id=${WARGAMING_APPLICATION_ID}&search=${encodedSearch}&limit=${normalizedLimit}`, ).then( (value) => value && diff --git a/src/core/blitz/listClansPanServer.ts b/src/core/blitz/listClansPanServer.ts index cf81c97ff..2d5fc148c 100644 --- a/src/core/blitz/listClansPanServer.ts +++ b/src/core/blitz/listClansPanServer.ts @@ -1,6 +1,6 @@ import { BlitzServer } from '../../constants/servers.js'; import { Clan, ClanList } from '../../types/clanList.js'; -import { wargamingApplicationId } from '../process/args.js'; +import { WARGAMING_APPLICATION_ID } from '../process/args.js'; import getWargamingResponse from './getWargamingResponse.js'; export type ClanListWithServer = (Clan & { @@ -15,7 +15,7 @@ export default async function listClansPanServer(search: string, limit = 9) { return ( await Promise.all([ getWargamingResponse( - `https://api.wotblitz.com/wotb/clans/list/?application_id=${wargamingApplicationId}&search=${search}&limit=${normalizedLimit}`, + `https://api.wotblitz.com/wotb/clans/list/?application_id=${WARGAMING_APPLICATION_ID}&search=${search}&limit=${normalizedLimit}`, ).then( (value) => value && @@ -25,7 +25,7 @@ export default async function listClansPanServer(search: string, limit = 9) { })), ), getWargamingResponse( - `https://api.wotblitz.eu/wotb/clans/list/?application_id=${wargamingApplicationId}&search=${search}&limit=${normalizedLimit}`, + `https://api.wotblitz.eu/wotb/clans/list/?application_id=${WARGAMING_APPLICATION_ID}&search=${search}&limit=${normalizedLimit}`, ).then( (value) => value && @@ -35,7 +35,7 @@ export default async function listClansPanServer(search: string, limit = 9) { })), ), getWargamingResponse( - `https://api.wotblitz.asia/wotb/clans/list/?application_id=${wargamingApplicationId}&search=${search}&limit=${normalizedLimit}`, + `https://api.wotblitz.asia/wotb/clans/list/?application_id=${WARGAMING_APPLICATION_ID}&search=${search}&limit=${normalizedLimit}`, ).then( (value) => value && diff --git a/src/core/process/args.ts b/src/core/process/args.ts index db57e13d3..dc8797b8c 100644 --- a/src/core/process/args.ts +++ b/src/core/process/args.ts @@ -1,9 +1,9 @@ -export const discordToken = process.env.DISCORD_TOKEN!; -export const wargamingApplicationId = process.env.WARGAMING_APPLICATION_ID!; +export const DISCORD_TOKEN = process.env.DISCORD_TOKEN!; +export const WARGAMING_APPLICATION_ID = process.env.WARGAMING_APPLICATION_ID!; -if (!discordToken) { +if (!DISCORD_TOKEN) { throw new Error('No Discord token provided'); } -if (!wargamingApplicationId) { +if (!WARGAMING_APPLICATION_ID) { throw new Error('No Wargaming application id provided}'); } diff --git a/src/events/interactionCreate.ts b/src/events/interactionCreate.ts index 46d80e8f9..37ec47d85 100644 --- a/src/events/interactionCreate.ts +++ b/src/events/interactionCreate.ts @@ -27,7 +27,7 @@ import tankstats from '../commands/tankstats.js'; import today from '../commands/today.js'; import verify from '../commands/verify.js'; import negativeEmbed from '../core/interaction/negativeEmbed.js'; -import { discordToken } from '../core/process/args.js'; +import { DISCORD_TOKEN } from '../core/process/args.js'; import getClientId from '../core/process/getClientId.js'; import isDev from '../core/process/isDev.js'; import { handleError } from './error.js'; @@ -42,7 +42,7 @@ export interface CommandRegistry { autocomplete?: (interaction: AutocompleteInteraction) => void; } -const rest = new REST().setToken(discordToken); +const rest = new REST().setToken(DISCORD_TOKEN); const commands = [ debug, diff --git a/src/index.ts b/src/index.ts index caadbc5f3..53af8e31e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,5 @@ import { Client, GatewayIntentBits } from 'discord.js'; -import { discordToken } from './core/process/args.js'; +import { DISCORD_TOKEN } from './core/process/args.js'; import { registerErrorHandlers } from './events/error.js'; import guildMemberAdd from './events/guildMemberAdd.js'; import interactionCreate from './events/interactionCreate.js'; @@ -13,4 +13,4 @@ export const client = new Client({ .on('interactionCreate', interactionCreate); registerErrorHandlers(); -client.login(discordToken); +client.login(DISCORD_TOKEN);