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) =>
24
24
async function editChannels ( interaction , channels ) {
25
25
for ( const data of channels ) {
26
26
const channel = data [ 1 ] ;
27
+
28
+ if ( ! channel ) continue ;
29
+
27
30
const is_valid = is_valid_course_name ( channel . name ) ;
28
31
29
32
if ( ! is_valid || channel . type !== "GUILD_TEXT" ) continue ;
@@ -98,6 +101,9 @@ async function allFixed(interaction, channels) {
98
101
const unfixed = [ ] ;
99
102
for ( const data of channels ) {
100
103
const channel = data [ 1 ] ;
104
+
105
+ if ( ! channel ) continue ;
106
+
101
107
const fixed = await isFixed ( interaction , channel ) ;
102
108
103
109
if ( ! fixed ) unfixed . push ( channel . name ) ;
@@ -143,7 +149,7 @@ module.exports = {
143
149
144
150
if ( ! interaction . options . getBoolean ( "singlechannel" ) ) {
145
151
// Get all channels and run specified function
146
- const channels = await interaction . guild . channels . fetch ( ) ;
152
+ const channels = interaction . guild . channels . cache ;
147
153
148
154
if ( ! interaction . options . getBoolean ( "check" ) ) {
149
155
await editChannels ( interaction , channels ) ;
You can’t perform that action at this time.
0 commit comments