Skip to content

Commit 31ff815

Browse files
committed
Add support for user installed integrations
1 parent 91ef90f commit 31ff815

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

NetCordBuddy/Modules/ButtonInteractions/DocsInteraction.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ public class DocsInteraction(DocsService docsService, IOptions<Configuration> op
1313
[ComponentInteraction("docs")]
1414
public InteractionCallback Docs(int page, string query)
1515
{
16-
var interaction = Context.Message.Interaction!;
16+
var interactionMetadata = Context.Message.InteractionMetadata!;
1717
var config = options.Value;
18-
return InteractionCallback.ModifyMessage(m => m.AddEmbeds(DocsHelper.CreateDocsEmbed(query, page, docsService, config, interaction.Id, interaction.User, out var more))
18+
return InteractionCallback.ModifyMessage(m => m.AddEmbeds(DocsHelper.CreateDocsEmbed(query, page, docsService, config, interactionMetadata.Id, interactionMetadata.User, out var more))
1919
.WithComponents(DocsHelper.CreateDocsComponents(query, page, more, config)));
2020
}
2121
}

NetCordBuddy/Modules/SlashCommands/DocsCommand.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ namespace NetCordBuddy.Modules.SlashCommands;
1010

1111
public class DocsCommand(DocsService docsService, IOptions<Configuration> options) : ApplicationCommandModule<SlashCommandContext>
1212
{
13-
[SlashCommand("docs", "Allows you to search the documentation via Discord")]
13+
[SlashCommand("docs", "Allows you to search the documentation via Discord", IntegrationTypes = [ApplicationIntegrationType.GuildInstall, ApplicationIntegrationType.UserInstall])]
1414
public InteractionMessageProperties Docs([SlashCommandParameter(Description = "Search query", MaxLength = 90, AutocompleteProviderType = typeof(QueryAutocompleteProvider))] string query)
1515
{
1616
var config = options.Value;

NetCordBuddy/NetCordBuddy.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
1313
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
1414
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
15-
<PackageReference Include="NetCord" Version="1.0.0-alpha.280" />
16-
<PackageReference Include="NetCord.Hosting" Version="1.0.0-alpha.50" />
17-
<PackageReference Include="NetCord.Hosting.Services" Version="1.0.0-alpha.59" />
18-
<PackageReference Include="NetCord.Services" Version="1.0.0-alpha.181" />
15+
<PackageReference Include="NetCord" Version="1.0.0-alpha.292" />
16+
<PackageReference Include="NetCord.Hosting" Version="1.0.0-alpha.62" />
17+
<PackageReference Include="NetCord.Hosting.Services" Version="1.0.0-alpha.71" />
18+
<PackageReference Include="NetCord.Services" Version="1.0.0-alpha.193" />
1919
</ItemGroup>
2020

2121
<ItemGroup>

0 commit comments

Comments
 (0)