@@ -163,15 +163,17 @@ export default {
163163 courses [ index ] . save ( ) ;
164164
165165 // Ping members who have this role
166- const role = msgInt . guild . roles . cache . find ( ( role ) => {
166+ const found_role = msgInt . guild . roles . cache . find ( ( role ) => {
167167 return (
168168 cleanRoleString ( role . name ) ==
169169 cleanChannelString ( courses [ index ] . CODE )
170170 ) ;
171171 } ) ;
172- if ( role !== undefined ) {
172+ if ( found_role !== undefined ) {
173173 //Ping member
174- new_channel . send ( `Hey! <@&${ role . id } > here is a channel for you!` ) ;
174+ new_channel . send (
175+ `Hey! <@&${ found_role . id } > here is a channel for you!`
176+ ) ;
175177 }
176178 } else if (
177179 channel . parent !== null &&
@@ -194,15 +196,17 @@ export default {
194196 courses [ index ] . CHANNEL_ID = channel . id ;
195197 courses [ index ] . save ( ) ;
196198 // Ping members who have this role
197- const role = msgInt . guild . roles . cache . find ( ( role ) => {
199+ const found_role = msgInt . guild . roles . cache . find ( ( role ) => {
198200 return (
199201 cleanRoleString ( role . name ) ==
200202 cleanChannelString ( courses [ index ] . CODE )
201203 ) ;
202204 } ) ;
203- if ( role !== undefined ) {
205+ if ( found_role !== undefined ) {
204206 //Ping member
205- channel . send ( `Hey! <@&${ role . id } > here is the channel for you!` ) ;
207+ channel . send (
208+ `Hey! <@&${ found_role . id } > here is the channel for you!`
209+ ) ;
206210 }
207211 } else if (
208212 channel . parent !== null &&
@@ -239,3 +243,4 @@ export default {
239243 ) ;
240244 } ,
241245} as ICommand ;
246+
0 commit comments