Releases: Hawxy/Discord.Addons.Hosting
Releases · Hawxy/Discord.Addons.Hosting
v3.0.0
Breaking changes
- The previous builder has been replaced with a simple action that modifies the host configuration.
//....
.ConfigureDiscordHost<DiscordSocketClient>((context, config) =>
{
config.SocketConfig = new DiscordSocketConfig
{
LogLevel = LogSeverity.Verbose,
AlwaysDownloadUsers = true,
MessageCacheSize = 200
};
config.Token = context.Configuration["token"];
})
- The experimental Reliability extensions have been removed as Discord.NET's reliability has improved a lot over the last few releases and these extensions were never very, ahem, reliable themselves. Replace
RunReliablyAsync()
withRunAsync()
within your code. - Microsoft.Extensions.Hosting v3.1.5 & Discord.NET v2.2.0 are now the minimum supported versions.
Other changes
- Cancellation is now better handled within the hosted service.
IOptions
is now used throughout the library, permitting usage ofservices.Configure<T>()
to configure either the host or the command service depending on your scenario.
v2.1.0
v2.0.0
Breaking changes
- The various configuration calls within the builder for the discord client have been simplified to a single extension:
.ConfigureDiscordHost<DiscordSocketClient>((context, configurationBuilder) =>
{
configurationBuilder.SetDiscordConfiguration(new DiscordSocketConfig
{
LogLevel = LogSeverity.Verbose,
AlwaysDownloadUsers = true,
MessageCacheSize = 200
});
configurationBuilder.SetToken(context.Configuration["token"]);
configurationBuilder.SetCustomLogFormat((message, exception) => $"{message.Source}: {message.Message}");
})
- The token's location now needs to manually set via the
SetToken()
method - Microsoft.Extensions.Hosting v3.0.0 is now the minimum supported version
Other changes
- Host will now handle startup cancellation correctly & exit
- Added netstandard2.1 target
- Updated examples to .NET Core 3.0