Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Documentation/guides/basic-concepts/http-interactions.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ To handle HTTP interactions from Discord in your bot, you need to use @NetCord.H

### Receiving HTTP Interactions via HTTP Interaction Handler

You can also create your own @NetCord.Hosting.IHttpInteractionHandler to handle HTTP interactions manually. This allows you to have full control over the behavior of your bot when receiving HTTP interactions. You register them using @"NetCord.Hosting.HttpInteractionHandlerServiceCollectionExtensions.AddHttpInteractionHandler``1(Microsoft.Extensions.DependencyInjection.IServiceCollection)?text=AddHttpInteractionHandler".
You can also create your own @NetCord.Hosting.IHttpInteractionHandler to handle HTTP interactions manually. This allows you to have full control over the behavior of your bot when receiving HTTP interactions. You register them using @"NetCord.Hosting.HttpInteractionHandlerServiceCollectionExtensions.AddHttpInteractionHandler``1(Microsoft.Extensions.DependencyInjection.IServiceCollection,Microsoft.Extensions.DependencyInjection.ServiceLifetime)?text=AddHttpInteractionHandler".

[!code-cs[HttpInteractionHandler.cs](HttpInteractions/HttpInteractionHandler.cs#L6-L14)]

Expand Down
2 changes: 1 addition & 1 deletion Documentation/guides/events/first-events.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

The preferred way to receive events with the .NET Generic Host is by implementing appropriate @"NetCord.Hosting.Gateway.IGatewayHandler"s. An example of such an interface is @NetCord.Hosting.Gateway.IMessageCreateGatewayHandler.

Use @NetCord.Hosting.Gateway.GatewayHandlerServiceCollectionExtensions.AddGatewayHandlers(Microsoft.Extensions.DependencyInjection.IServiceCollection,System.Reflection.Assembly) to add all event handlers in an assembly.
Use @NetCord.Hosting.Gateway.GatewayHandlerServiceCollectionExtensions.AddGatewayHandlers(Microsoft.Extensions.DependencyInjection.IServiceCollection,System.Reflection.Assembly,Microsoft.Extensions.DependencyInjection.ServiceLifetime) to add all event handlers in an assembly.
[!code-cs[Program.cs](FirstEventsHosting/Program.cs?highlight=17)]

### MessageCreate Event
Expand Down