File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -6,11 +6,15 @@ import { createError, ctx } from './harmonix'
66import { contextMenuToJSON , isHarmonixCommand , slashToJSON } from './utils'
77
88export const initCient = ( harmonixOptions : Harmonix [ 'options' ] ) => {
9- const client = new Client ( harmonixOptions . client )
9+ try {
10+ const client = new Client ( harmonixOptions . client )
1011
11- client . login ( process . env . DISCORD_CLIENT_TOKEN )
12+ client . login ( process . env . DISCORD_CLIENT_TOKEN )
1213
13- return client
14+ return client
15+ } catch ( error : any ) {
16+ createError ( error . message )
17+ }
1418}
1519
1620export const refreshApplicationCommands = async ( harmonix : Harmonix ) => {
Original file line number Diff line number Diff line change @@ -39,7 +39,10 @@ export const loadOptions = async (
3939 resolve ( options . srcDir ! , dir ! )
4040 )
4141 options . scanDirs = [ ...new Set ( options . scanDirs ) ]
42+ const intents = options . client ?. intents || [ ]
43+
4244 options . client = options . client || { }
45+ options . client . intents = intents
4346
4447 return options
4548}
You can’t perform that action at this time.
0 commit comments