Skip to content

Commit 99ab5c2

Browse files
committed
send slash command replies smarter for defers
1 parent a024d62 commit 99ab5c2

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

CommandHandlers/UserCommands.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,14 @@ public static IUserMessage SendReply(IUserMessage message, Embed embed, IMessage
4747
/// <param name="embed">The embed message to send.</param>
4848
public static void SendReply(SocketSlashCommand command, Embed embed)
4949
{
50-
command.RespondAsync(embed: embed, allowedMentions: AllowedMentions.None).Wait();
50+
if (command.HasResponded)
51+
{
52+
command.ModifyOriginalResponseAsync((p) => { p.Embed = embed; p.AllowedMentions = AllowedMentions.None; }).Wait();
53+
}
54+
else
55+
{
56+
command.RespondAsync(embed: embed, allowedMentions: AllowedMentions.None).Wait();
57+
}
5158
}
5259

5360
/// <summary>

0 commit comments

Comments
 (0)