File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,18 @@ export const readyEvent = createEvent(
3030 console . log ( `🔄 Starting guide sync to channel ${ config . guides . channelId } ...` ) ;
3131 await syncGuidesToChannel ( client , config . guides . channelId ) ;
3232 } catch ( error ) {
33- console . error ( '❌ Failed to sync guides:' , error ) ;
33+ if ( error && typeof error === 'object' && 'code' in error ) {
34+ const discordError = error as { code : number ; message ?: string } ;
35+ if ( discordError . code === 50001 ) {
36+ console . warn (
37+ '⚠️ Bot does not have access to the guides channel. Please check bot permissions and channel ID.'
38+ ) ;
39+ } else {
40+ console . error ( '❌ Failed to sync guides:' , error ) ;
41+ }
42+ } else {
43+ console . error ( '❌ Failed to sync guides:' , error ) ;
44+ }
3445 }
3546 }
3647 }
You can’t perform that action at this time.
0 commit comments