API reference
Class DiscordHostedService
- Namespace
- DisCatSharp.Hosting
- Assembly
- DisCatSharp.Hosting.dll
Simple implementation for DiscordClient to work as a BackgroundService
public abstract class DiscordHostedService : BaseHostedService, IDisposable, IDiscordHostedService, IHostedService
- Inheritance
-
DiscordHostedService
- Implements
- Inherited Members
Constructors
- DiscordHostedService(IConfiguration, ILogger<DiscordHostedService>, IServiceProvider, IHostApplicationLifetime, string)
Initializes a new instance of the DiscordHostedService class.
Properties
- Client
Reference to connected client
Methods
- ConfigureAsync()
Configure / Initialize the DiscordClient or DiscordShardedClient
- ConfigureExtensionsAsync()
Configure the extensions for your DiscordShardedClient or DiscordClient
- ConnectAsync()
Connect your client(s) to Discord