#how to send ephemeral message in current channel?

1 messages · Page 1 of 1 (latest)

steady orbit
#

how?

rotund crescent
#

run CreateResponseAsync on the interaction and set ephemeral parameter to true

#

and if you're deferring the interaction set the ephemeral parameter on DeferAsync to true

steady orbit
#

ephemeral is not declared

#
            await ctx.EditResponseAsync(new DiscordWebhookBuilder().WithContent("test").ephemeral);
rotund crescent
steady orbit
#

i do that

#
            await ctx.DeferAsync();
            await ctx.CreateResponseAsync(InteractionResponseType.DeferredChannelMessageWithSource);


            await ctx.EditResponseAsync(new DiscordWebhookBuilder().WithContent("test").ephemeral);
#

full code

#

oh

steady orbit
#

?

rotund crescent
#

first of all you're deferring twice

#

secondly you aren't setting the ephemeral parameter on your DeferAsync call to true

#

so it won't be ephemeral

steady orbit
#

i got it

#

also after the interaction do you know how i can send message in current channel?

umbral cipher
#

ctx.Channel.SendMessageAsync?

steady orbit
#

i tried but does not send message

umbral cipher
#

thats odd

rotund crescent
steady orbit
#

is this?

umbral cipher
#

Send Messages