#how to send ephemeral message in current channel?
1 messages · Page 1 of 1 (latest)
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
ephemeral is not declared
await ctx.EditResponseAsync(new DiscordWebhookBuilder().WithContent("test").ephemeral);
and if you're deferring the interaction set the ephemeral parameter on DeferAsync to true
soawait ctx.DeferAsync(true);on wherever you defer the interaction
i do that
await ctx.DeferAsync();
await ctx.CreateResponseAsync(InteractionResponseType.DeferredChannelMessageWithSource);
await ctx.EditResponseAsync(new DiscordWebhookBuilder().WithContent("test").ephemeral);
full code
oh
aight no
?
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
i got it
also after the interaction do you know how i can send message in current channel?
ctx.Channel.SendMessageAsync?
i tried but does not send message
thats odd
does your bot have the necessary permissions to send messages?
is this?
Send Messages