Class ServiceCollectionExtensions
Contains all the extensions methods for IServiceCollection.
Inherited Members
System.Object.Equals(System.Object)
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Color_Chan.Discord.Commands.Extensions
Assembly: Color-Chan.Discord.Commands.dll
Syntax
public static class ServiceCollectionExtensions
Methods
| Improve this Doc View SourceAddColorChanDiscordCommand(IServiceCollection, Action<SlashCommandConfiguration>, Action<CacheConfiguration>, Action<RedisCacheOptions>, Action<ComponentInteractionConfiguration>)
Add the dependencies for Color-Chan.Discord.Command to the IServiceCollection.
Declaration
public static IServiceCollection AddColorChanDiscordCommand(this IServiceCollection services, Action<SlashCommandConfiguration> slashCommandConfigs = null, Action<CacheConfiguration> defaultCacheConfig = null, Action<RedisCacheOptions> redisCacheOptions = null, Action<ComponentInteractionConfiguration> componentInteractionConfig = null)
Parameters
Type | Name | Description |
---|---|---|
IServiceCollection | services | The IServiceCollection. |
System.Action<SlashCommandConfiguration> | slashCommandConfigs | The configuration options for slash commands. |
System.Action<CacheConfiguration> | defaultCacheConfig | The default cache configurations. Leave this null to use the default expiration values. |
System.Action<Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions> | redisCacheOptions | The cache options for the redis cache. Leave this null if you want to use a local cache. |
System.Action<ComponentInteractionConfiguration> | componentInteractionConfig | The configurations options for the component interactions. |
Returns
Type | Description |
---|---|
IServiceCollection | The updated IServiceCollection. |
AddInteractionPipeline<TPipeline>(IServiceCollection)
Adds a IInteractionPipeline to the services
.
Declaration
public static IServiceCollection AddInteractionPipeline<TPipeline>(this IServiceCollection services)
where TPipeline : class, IInteractionPipeline
Parameters
Type | Name | Description |
---|---|---|
IServiceCollection | services | The IServiceCollection where the |
Returns
Type | Description |
---|---|
IServiceCollection | The updated IServiceCollection. |
Type Parameters
Name | Description |
---|---|
TPipeline | The new IInteractionPipeline. |