@@ -117,8 +117,16 @@ export default [
117
117
// @ts -expect-error Types for this are super busted
118
118
new ActionRowBuilder ( ) . addComponents (
119
119
new ButtonBuilder ( )
120
- . setCustomId ( `close-ticket||${ user . id } ` )
120
+ . setCustomId ( `close-ticket||${ user . id } || ` )
121
121
. 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 (👎)" )
122
130
. setStyle ( ButtonStyle . Danger ) ,
123
131
) ,
124
132
] ,
@@ -134,7 +142,8 @@ export default [
134
142
{
135
143
command : { type : InteractionType . MessageComponent , name : "close-ticket" } ,
136
144
handler : async ( interaction ) => {
137
- const [ , ticketOpenerUserId ] = interaction . customId . split ( "||" ) ;
145
+ const [ , ticketOpenerUserId , feedback ] = interaction . customId . split ( "||" ) ;
146
+ console . log ( ticketOpenerUserId , feedback , interaction . customId ) ;
138
147
const threadId = interaction . channelId ;
139
148
if ( ! interaction . member || ! interaction . guild ) {
140
149
console . error (
@@ -160,7 +169,7 @@ export default [
160
169
rest . delete ( Routes . threadMembers ( threadId , ticketOpenerUserId ) ) ,
161
170
rest . post ( Routes . channelMessages ( modLog ) , {
162
171
body : {
163
- content : `<@${ ticketOpenerUserId } >’s ticket <#${ threadId } > closed by <@${ interactionUserId } > ` ,
172
+ content : `<@${ ticketOpenerUserId } >’s ticket <#${ threadId } > closed by <@${ interactionUserId } >${ feedback ? `. feedback: ${ feedback } ` : "" } ` ,
164
173
allowedMentions : { users : [ ] , roles : [ ] } ,
165
174
} ,
166
175
} ) ,
0 commit comments