Skip to content

Commit

Permalink
Use TargetMessage for message deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverbooth committed Jul 24, 2022
1 parent 22778b1 commit 54ca2f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Hammer/Commands/DeleteMessageCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public async Task DeleteMessageAsync(ContextMenuContext context)
await context.DeferAsync(true).ConfigureAwait(false);
var builder = new DiscordWebhookBuilder();

DiscordMessage? message = context.Interaction.Data.Resolved.Messages.FirstOrDefault().Value;
DiscordMessage? message = context.TargetMessage;
if (message is null)
{
builder.WithContent("The specified message could not be retrieved.");
Expand Down

0 comments on commit 54ca2f5

Please sign in to comment.