File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,9 @@ const in_overwrites = (overwrites, id) =>
2424async function editChannels ( interaction , channels ) {
2525 for ( const data of channels ) {
2626 const channel = data [ 1 ] ;
27+
28+ if ( ! channel ) continue ;
29+
2730 const is_valid = is_valid_course_name ( channel . name ) ;
2831
2932 if ( ! is_valid || channel . type !== "GUILD_TEXT" ) continue ;
@@ -98,6 +101,9 @@ async function allFixed(interaction, channels) {
98101 const unfixed = [ ] ;
99102 for ( const data of channels ) {
100103 const channel = data [ 1 ] ;
104+
105+ if ( ! channel ) continue ;
106+
101107 const fixed = await isFixed ( interaction , channel ) ;
102108
103109 if ( ! fixed ) unfixed . push ( channel . name ) ;
@@ -143,7 +149,7 @@ module.exports = {
143149
144150 if ( ! interaction . options . getBoolean ( "singlechannel" ) ) {
145151 // Get all channels and run specified function
146- const channels = await interaction . guild . channels . fetch ( ) ;
152+ const channels = interaction . guild . channels . cache ;
147153
148154 if ( ! interaction . options . getBoolean ( "check" ) ) {
149155 await editChannels ( interaction , channels ) ;
You can’t perform that action at this time.
0 commit comments