Fix InteractionContext.Guild (#2014)

* fix InteractionContext.Guild

* remove user parameter from InteractionContext ctor
This commit is contained in:
Cenk Ergen
2022-01-06 01:24:33 +03:00
committed by GitHub
parent 68e3bed4ff
commit 944a0def97

View File

@@ -21,13 +21,13 @@ namespace Discord.Interactions
/// <param name="interaction">The underlying interaction.</param> /// <param name="interaction">The underlying interaction.</param>
/// <param name="user"><see cref="IUser"/> who executed the command.</param> /// <param name="user"><see cref="IUser"/> who executed the command.</param>
/// <param name="channel"><see cref="ISocketMessageChannel"/> the command originated from.</param> /// <param name="channel"><see cref="ISocketMessageChannel"/> the command originated from.</param>
public InteractionContext(IDiscordClient client, IDiscordInteraction interaction, IUser user, IMessageChannel channel = null) public InteractionContext(IDiscordClient client, IDiscordInteraction interaction, IMessageChannel channel = null)
{ {
Client = client; Client = client;
Interaction = interaction; Interaction = interaction;
Channel = channel; Channel = channel;
Guild = (interaction as IGuildUser)?.Guild; Guild = (interaction.User as IGuildUser)?.Guild;
User = user; User = interaction.User;
Interaction = interaction; Interaction = interaction;
} }
} }