File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -20,13 +20,11 @@ export const refreshApplicationCommands = async (harmonix: Harmonix) => {
2020 ]
2121 const rest = new REST ( ) . setToken ( process . env . HARMONIX_CLIENT_TOKEN ! )
2222
23- harmonix . client ?. once ( 'ready' , async ( ) => {
23+ harmonix . client ?. once ( 'ready' , async ( client ) => {
2424 try {
2525 consola . info ( 'Started refreshing application commands.' )
2626 await rest . put (
27- Routes . applicationCommands (
28- harmonix . options . clientId || harmonix . client ?. user ?. id || ''
29- ) ,
27+ Routes . applicationCommands ( harmonix . options . clientId || client . user . id ) ,
3028 {
3129 body : commands . map ( ( cmd ) =>
3230 isHarmonixCommand ( cmd ) ? slashToJSON ( cmd ) : contextMenuToJSON ( cmd )
@@ -37,7 +35,7 @@ export const refreshApplicationCommands = async (harmonix: Harmonix) => {
3735 const readyEvent = harmonix . events . get ( 'ready' )
3836
3937 if ( readyEvent ) {
40- ctx . call ( harmonix , ( ) => readyEvent . callback ( harmonix . client as any ) )
38+ ctx . call ( harmonix , ( ) => readyEvent . callback ( client ) )
4139 }
4240 } catch ( error : any ) {
4341 createError ( error . message )
You can’t perform that action at this time.
0 commit comments