Skip to content

Commit 6be6d93

Browse files
committed
fix: change HARMONIX_CLIENT_TOKEN env variable to DISCORD_CLIENT_TOKEN
1 parent b2c2f74 commit 6be6d93

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

src/discord.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { contextMenuToJSON, isHarmonixCommand, slashToJSON } from './utils'
88
export const initCient = (harmonixOptions: Harmonix['options']) => {
99
const client = new Client(harmonixOptions.clientOptions)
1010

11-
client.login(process.env.HARMONIX_CLIENT_TOKEN)
11+
client.login(process.env.DISCORD_CLIENT_TOKEN)
1212

1313
return client
1414
}
@@ -18,7 +18,7 @@ export const refreshApplicationCommands = async (harmonix: Harmonix) => {
1818
...harmonix.commands.filter((cmd) => cmd.options.slash).map((cmd) => cmd),
1919
...harmonix.contextMenus.map((cmd) => cmd)
2020
]
21-
const rest = new REST().setToken(process.env.HARMONIX_CLIENT_TOKEN!)
21+
const rest = new REST().setToken(process.env.DISCORD_CLIENT_TOKEN!)
2222

2323
harmonix.client?.once('ready', async (client) => {
2424
try {

src/harmonix.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,9 @@ export const createHarmonix = async (
7777
resolvePrecondition(prc, harmonix.options)
7878
)
7979

80-
if (!process.env.HARMONIX_CLIENT_TOKEN) {
80+
if (!process.env.DISCORD_CLIENT_TOKEN) {
8181
createError(
82-
'Client token is required. Please provide it in the environment variable HARMONIX_CLIENT_TOKEN.'
83-
)
84-
}
85-
if (!harmonix.options.clientId && !process.env.HARMONIX_CLIENT_ID) {
86-
createError(
87-
'Client ID is required. You can provide it in the configuration file or in the environment variable HARMONIX_CLIENT_ID.'
82+
'Client token is required. Please provide it in the environment variable DISCORD_CLIENT_TOKEN.'
8883
)
8984
}
9085
consola.log(colors.blue(`Harmonix ${colors.bold(version)}\n`))

0 commit comments

Comments
 (0)