@@ -18,16 +18,17 @@ export async function handleStaffThreadMessage(
1818 interaction : ChatInputCommandInteraction < 'cached' > ,
1919 action : HandleStaffThreadMessageAction ,
2020) {
21- const prisma = container . resolve ( PrismaClient ) ;
21+ await interaction . deferReply ( { ephemeral : true } ) ;
2222
23+ const prisma = container . resolve ( PrismaClient ) ;
2324 const thread = await prisma . thread . findFirst ( {
2425 where : {
2526 channelId : interaction . channelId ,
2627 closedById : null ,
2728 } ,
2829 } ) ;
2930 if ( ! thread ) {
30- return interaction . reply ( i18next . t ( 'common.errors.no_thread' ) ) ;
31+ return interaction . editReply ( i18next . t ( 'common.errors.no_thread' ) ) ;
3132 }
3233
3334 let options : Partial < SendStaffThreadMessageOptions > = {
@@ -42,7 +43,7 @@ export async function handleStaffThreadMessage(
4243
4344 const member = await interaction . guild . members . fetch ( thread . userId ) . catch ( ( ) => null ) ;
4445 if ( ! member ) {
45- return interaction . reply ( i18next . t ( 'common.errors.no_member' , { lng : interaction . locale } ) ) ;
46+ return interaction . editReply ( i18next . t ( 'common.errors.no_member' , { lng : interaction . locale } ) ) ;
4647 }
4748
4849 options . member = member ;
@@ -59,7 +60,7 @@ export async function handleStaffThreadMessage(
5960 } ,
6061 } ) ;
6162 if ( ! threadMessage ) {
62- return interaction . reply (
63+ return interaction . editReply (
6364 i18next . t ( 'common.errors.resource_not_found' , {
6465 resource : 'message' ,
6566 lng : interaction . locale ,
@@ -68,13 +69,13 @@ export async function handleStaffThreadMessage(
6869 }
6970
7071 if ( threadMessage . staffId !== interaction . user . id ) {
71- return interaction . reply ( i18next . t ( 'common.errors.not_own_message' , { lng : interaction . locale } ) ) ;
72+ return interaction . editReply ( i18next . t ( 'common.errors.not_own_message' , { lng : interaction . locale } ) ) ;
7273 }
7374
7475 const clearAttachment = interaction . options . getBoolean ( 'clear-attachment' ) ;
7576
7677 if ( attachment && clearAttachment ) {
77- return interaction . reply (
78+ return interaction . editReply (
7879 i18next . t ( 'common.errors.arg_conflict' , {
7980 first : 'attachment' ,
8081 second : 'clear-attachment' ,
0 commit comments