TL;DR
After installing CannoliKit and other related packages, you need to complete the following steps to set up your project:
- Define a derived
DbContextthat implementsICannoliDbContext, referred to below asFooDbContext. - Implement dependency injection (DI).
- Add
DiscordSocketClientas a singleton service. - Add a
DbContextservice usingFooDbContext. Its lifetime is expected to beScoped. - Add Cannoli services using the
IServiceCollection.AddCannoliServices<T>()extension method, whereTisFooDbContext. - Add an
ILoggerservice. - Prior to connecting your bot, get the
ICannoliClientservice and call theSetupAsync()method.
Next Steps
Once you are set up, check out CannoliKit features: