Skip to content

Commit

Permalink
Merge pull request #346 from carlst99/main/fixUserTargetOnSelectSamples
Browse files Browse the repository at this point in the history
Samples: Fix user target resolution on feedback responses
  • Loading branch information
Nihlus authored Jan 2, 2025
2 parents 1b3c84a + 78e67de commit 2e3a7a9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Samples/Interactivity/Interactions/SelectMenuInteractions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
using Remora.Discord.API.Abstractions.Rest;
using Remora.Discord.API.Objects;
using Remora.Discord.Commands.Contexts;
using Remora.Discord.Commands.Extensions;
using Remora.Discord.Commands.Feedback.Messages;
using Remora.Discord.Commands.Feedback.Services;
using Remora.Discord.Interactivity;
Expand Down Expand Up @@ -145,7 +146,7 @@ public async Task<Result> ExplainEmojiAsync(IReadOnlyList<IEmoji> values)
return (Result)await _feedback.SendContextualNeutralAsync
(
message,
_context.Interaction.User.TryGet(out var user) ? user.ID : default,
_context.TryGetUserID(out var userID) ? userID : default,
options: new FeedbackMessageOptions(MessageFlags: MessageFlags.Ephemeral),
ct: this.CancellationToken
);
Expand Down Expand Up @@ -178,7 +179,7 @@ public async Task<Result> ShowSelectedMentionablesAsync(IReadOnlyList<IUser> use
return (Result)await _feedback.SendContextualNeutralAsync
(
stringBuilder.ToString(),
_context.Interaction.User.TryGet(out var user) ? user.ID : default,
_context.TryGetUserID(out var userID) ? userID : default,
options: new FeedbackMessageOptions
(
MessageFlags: MessageFlags.Ephemeral,
Expand Down

0 comments on commit 2e3a7a9

Please sign in to comment.