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