@@ -141,7 +141,8 @@ export default command({
141141 ) ;
142142 // Successfully solved the thread
143143 // Get the first message in the thread
144- const start_message = await thread . fetchStarterMessage ( ) ;
144+ const start_message =
145+ await thread . fetchStarterMessage ( ) ;
145146 // Get the first 2 messages after the start message
146147 const messages = await thread . messages . fetch ( {
147148 limit : 2 ,
@@ -167,7 +168,9 @@ export default command({
167168 msg . components = [ row ] ;
168169 await bot_message . edit ( msg ) ;
169170 // Commands require a reply
170- await interaction . followUp ( wrap_in_embed ( 'Thread solved.' ) ) ;
171+ await interaction . followUp (
172+ wrap_in_embed ( 'Thread solved.' ) ,
173+ ) ;
171174 // Delete the reply after 10 seconds
172175 setTimeout ( async ( ) => {
173176 await interaction . deleteReply ( ) ;
@@ -177,21 +180,33 @@ export default command({
177180 if ( ! ( thread . parent instanceof ForumChannel ) )
178181 throw new Error ( "Can't solve a non-help channel" ) ;
179182 // Parent forum channel
180- const solveChannel = thread . guild . channels . cache . get ( thread . parentId ) as ForumChannel
183+ const solveChannel = thread . guild . channels . cache . get (
184+ thread . parentId ,
185+ ) as ForumChannel ;
181186 // Solve tag
182- const solveTag = solveChannel . availableTags . find ( tag => tag . name === SOLVED_TAG ) . id
187+ const solveTag = solveChannel . availableTags . find (
188+ ( tag ) => tag . name === SOLVED_TAG ,
189+ ) . id ;
183190 // Unsolve tag
184- const unsolveTag = solveChannel . availableTags . find ( tag => tag . name === UNSOLVED_TAG ) . id
191+ const unsolveTag = solveChannel . availableTags . find (
192+ ( tag ) => tag . name === UNSOLVED_TAG ,
193+ ) . id ;
185194 // If this is a ThreadChannel
186- let tags = thread . appliedTags . filter ( tag => tag !== solveTag && tag !== unsolveTag ) . splice ( 0 , 4 )
195+ let tags = thread . appliedTags
196+ . filter ( ( tag ) => tag !== solveTag && tag !== unsolveTag )
197+ . splice ( 0 , 4 ) ;
187198 // Add the solved tag
188- tags . unshift ( solveTag )
199+ tags . unshift ( solveTag ) ;
189200 // If neither tag is going to exist in the channel, add unsolved
190- if ( ! tags . includes ( solveTag ) && ! tags . includes ( unsolveTag ) ) tags . unshift ( unsolveTag )
201+ if ( ! tags . includes ( solveTag ) && ! tags . includes ( unsolveTag ) )
202+ tags . unshift ( unsolveTag ) ;
191203 // Ensure no duplicates are in the array
192- tags = [ ...new Set ( tags ) ] . sort ( )
204+ tags = [ ...new Set ( tags ) ] . sort ( ) ;
193205 // Apply tags
194- if ( tags . toString ( ) !== thread . appliedTags . sort ( ) . toString ( ) ) thread . setAppliedTags ( tags )
206+ if (
207+ tags . toString ( ) !== thread . appliedTags . sort ( ) . toString ( )
208+ )
209+ thread . setAppliedTags ( tags ) ;
195210 // Commands require a reply
196211 await interaction . followUp ( wrap_in_embed ( 'Thread solved.' ) ) ;
197212 // Delete the reply after 10 seconds
0 commit comments