Skip to content

Commit f329d3c

Browse files
committed
fix: not register slash commands when there is not, change harmony env token name
1 parent 0bb4693 commit f329d3c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/discord.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { toJSON } from './commands'
66
export const initCient = (harmonyOptions: Harmony['options']) => {
77
const client = new Client({ intents: harmonyOptions.intents })
88

9-
client.login(process.env.HARMONY_TOKEN)
9+
client.login(process.env.HARMONY_CLIENT_TOKEN)
1010

1111
return client
1212
}
@@ -36,7 +36,8 @@ export const registerSlashCommands = async (
3636
harmony: Harmony,
3737
commands: HarmonyCommand<true>[]
3838
) => {
39-
const rest = new REST().setToken(process.env.HARMONY_TOKEN || '')
39+
if (commands.length === 0) return
40+
const rest = new REST().setToken(process.env.HARMONY_CLIENT_TOKEN || '')
4041

4142
await rest.put(
4243
Routes.applicationCommands(

0 commit comments

Comments
 (0)