Skip to content

Commit 944a0de

Browse files
authored
Fix InteractionContext.Guild (#2014)
* fix InteractionContext.Guild * remove user parameter from InteractionContext ctor
1 parent 68e3bed commit 944a0de

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Discord.Net.Interactions/InteractionContext.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ public class InteractionContext : IInteractionContext
2121
/// <param name="interaction">The underlying interaction.</param>
2222
/// <param name="user"><see cref="IUser"/> who executed the command.</param>
2323
/// <param name="channel"><see cref="ISocketMessageChannel"/> the command originated from.</param>
24-
public InteractionContext(IDiscordClient client, IDiscordInteraction interaction, IUser user, IMessageChannel channel = null)
24+
public InteractionContext(IDiscordClient client, IDiscordInteraction interaction, IMessageChannel channel = null)
2525
{
2626
Client = client;
2727
Interaction = interaction;
2828
Channel = channel;
29-
Guild = (interaction as IGuildUser)?.Guild;
30-
User = user;
29+
Guild = (interaction.User as IGuildUser)?.Guild;
30+
User = interaction.User;
3131
Interaction = interaction;
3232
}
3333
}

0 commit comments

Comments
 (0)