@@ -117,8 +117,16 @@ export default [
117117 // @ts -expect-error Types for this are super busted
118118 new ActionRowBuilder ( ) . addComponents (
119119 new ButtonBuilder ( )
120- . setCustomId ( `close-ticket||${ user . id } ` )
120+ . setCustomId ( `close-ticket||${ user . id } || ` )
121121 . setLabel ( "Close ticket" )
122+ . setStyle ( ButtonStyle . Primary ) ,
123+ new ButtonBuilder ( )
124+ . setCustomId ( `close-ticket||${ user . id } ||👍` )
125+ . setLabel ( "Close (👍)" )
126+ . setStyle ( ButtonStyle . Success ) ,
127+ new ButtonBuilder ( )
128+ . setCustomId ( `close-ticket||${ user . id } ||👎` )
129+ . setLabel ( "Close (👎)" )
122130 . setStyle ( ButtonStyle . Danger ) ,
123131 ) ,
124132 ] ,
@@ -134,7 +142,8 @@ export default [
134142 {
135143 command : { type : InteractionType . MessageComponent , name : "close-ticket" } ,
136144 handler : async ( interaction ) => {
137- const [ , ticketOpenerUserId ] = interaction . customId . split ( "||" ) ;
145+ const [ , ticketOpenerUserId , feedback ] = interaction . customId . split ( "||" ) ;
146+ console . log ( ticketOpenerUserId , feedback , interaction . customId ) ;
138147 const threadId = interaction . channelId ;
139148 if ( ! interaction . member || ! interaction . guild ) {
140149 console . error (
@@ -160,7 +169,7 @@ export default [
160169 rest . delete ( Routes . threadMembers ( threadId , ticketOpenerUserId ) ) ,
161170 rest . post ( Routes . channelMessages ( modLog ) , {
162171 body : {
163- content : `<@${ ticketOpenerUserId } >’s ticket <#${ threadId } > closed by <@${ interactionUserId } > ` ,
172+ content : `<@${ ticketOpenerUserId } >’s ticket <#${ threadId } > closed by <@${ interactionUserId } >${ feedback ? `. feedback: ${ feedback } ` : "" } ` ,
164173 allowedMentions : { users : [ ] , roles : [ ] } ,
165174 } ,
166175 } ) ,
0 commit comments