diff --git a/.github/workflows/Manual_Nuget_Push.yml b/.github/workflows/Manual_Nuget_Push.yml
new file mode 100644
index 0000000..799fe86
--- /dev/null
+++ b/.github/workflows/Manual_Nuget_Push.yml
@@ -0,0 +1,37 @@
+# ------------------------------------------------------------------------------
+#
+#
+# This code was generated.
+#
+# - To turn off auto-generation set:
+#
+# [GitHubActions (AutoGenerate = false)]
+#
+# - To trigger manual generation invoke:
+#
+# nuke --generate-configuration GitHubActions_Manual_Nuget_Push --host GitHubActions
+#
+#
+# ------------------------------------------------------------------------------
+
+name: Manual_Nuget_Push
+
+on: [workflow_dispatch]
+
+jobs:
+ ubuntu-latest:
+ name: ubuntu-latest
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - name: 'Cache: .nuke/temp, ~/.nuget/packages'
+ uses: actions/cache@v3
+ with:
+ path: |
+ .nuke/temp
+ ~/.nuget/packages
+ key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }}
+ - name: 'Run: NugetPush'
+ run: ./build.cmd NugetPush
+ env:
+ NugetApiKey: ${{ secrets.NUGET_API_KEY }}
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 2adc60b..f038057 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -1,23 +1,41 @@
-name: .NET Core Build
+# ------------------------------------------------------------------------------
+#
+#
+# This code was generated.
+#
+# - To turn off auto-generation set:
+#
+# [GitHubActions (AutoGenerate = false)]
+#
+# - To trigger manual generation invoke:
+#
+# nuke --generate-configuration GitHubActions_Build --host GitHubActions
+#
+#
+# ------------------------------------------------------------------------------
+
+name: Build
on:
push:
- branches: [ master ]
+ branches:
+ - master
pull_request:
- branches: [ master ]
+ branches:
+ - master
jobs:
- build:
-
+ ubuntu-latest:
+ name: ubuntu-latest
runs-on: ubuntu-latest
-
steps:
- - uses: actions/checkout@v2
- - name: Setup .NET Core
- uses: actions/setup-dotnet@v1
- with:
- dotnet-version: '6.0.x'
- - name: Install dependencies
- run: dotnet restore
- - name: Build
- run: dotnet build --configuration Release --no-restore
+ - uses: actions/checkout@v3
+ - name: 'Cache: .nuke/temp, ~/.nuget/packages'
+ uses: actions/cache@v3
+ with:
+ path: |
+ .nuke/temp
+ ~/.nuget/packages
+ key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }}
+ - name: 'Run: Compile'
+ run: ./build.cmd Compile
diff --git a/.nuke/build.schema.json b/.nuke/build.schema.json
new file mode 100644
index 0000000..4f72a31
--- /dev/null
+++ b/.nuke/build.schema.json
@@ -0,0 +1,111 @@
+{
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "$ref": "#/definitions/build",
+ "title": "Build Schema",
+ "definitions": {
+ "build": {
+ "type": "object",
+ "properties": {
+ "Continue": {
+ "type": "boolean",
+ "description": "Indicates to continue a previously failed build attempt"
+ },
+ "Help": {
+ "type": "boolean",
+ "description": "Shows the help text for this build assembly"
+ },
+ "Host": {
+ "type": "string",
+ "description": "Host for execution. Default is 'automatic'",
+ "enum": [
+ "AppVeyor",
+ "AzurePipelines",
+ "Bamboo",
+ "Bitbucket",
+ "Bitrise",
+ "GitHubActions",
+ "GitLab",
+ "Jenkins",
+ "Rider",
+ "SpaceAutomation",
+ "TeamCity",
+ "Terminal",
+ "TravisCI",
+ "VisualStudio",
+ "VSCode"
+ ]
+ },
+ "NoLogo": {
+ "type": "boolean",
+ "description": "Disables displaying the NUKE logo"
+ },
+ "NugetApiKey": {
+ "type": "string",
+ "description": "Nuget Api Key",
+ "default": "Secrets must be entered via 'nuke :secrets [profile]'"
+ },
+ "Partition": {
+ "type": "string",
+ "description": "Partition to use on CI"
+ },
+ "Plan": {
+ "type": "boolean",
+ "description": "Shows the execution plan (HTML)"
+ },
+ "Profile": {
+ "type": "array",
+ "description": "Defines the profiles to load",
+ "items": {
+ "type": "string"
+ }
+ },
+ "Root": {
+ "type": "string",
+ "description": "Root directory during build execution"
+ },
+ "Skip": {
+ "type": "array",
+ "description": "List of targets to be skipped. Empty list skips all dependencies",
+ "items": {
+ "type": "string",
+ "enum": [
+ "Clean",
+ "Compile",
+ "NugetPack",
+ "NugetPush",
+ "Restore"
+ ]
+ }
+ },
+ "Solution": {
+ "type": "string",
+ "description": "Path to a solution file that is automatically loaded"
+ },
+ "Target": {
+ "type": "array",
+ "description": "List of targets to be invoked. Default is '{default_target}'",
+ "items": {
+ "type": "string",
+ "enum": [
+ "Clean",
+ "Compile",
+ "NugetPack",
+ "NugetPush",
+ "Restore"
+ ]
+ }
+ },
+ "Verbosity": {
+ "type": "string",
+ "description": "Logging verbosity during build execution. Default is 'Normal'",
+ "enum": [
+ "Minimal",
+ "Normal",
+ "Quiet",
+ "Verbose"
+ ]
+ }
+ }
+ }
+ }
+}
diff --git a/.nuke/parameters.json b/.nuke/parameters.json
new file mode 100644
index 0000000..b9bef29
--- /dev/null
+++ b/.nuke/parameters.json
@@ -0,0 +1,4 @@
+{
+ "$schema": "./build.schema.json",
+ "Solution": "Discord.Addons.Hosting.sln"
+}
diff --git a/Discord.Addons.Hosting.sln b/Discord.Addons.Hosting.sln
index bbafa9a..2829839 100644
--- a/Discord.Addons.Hosting.sln
+++ b/Discord.Addons.Hosting.sln
@@ -11,12 +11,16 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.Simple", "Samples\Sa
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Sample.ShardedClient", "Samples\Sample.ShardedClient\Sample.ShardedClient.csproj", "{540A37B5-E304-49A4-B68E-08941C0D33F1}"
EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "_build", "build\_build.csproj", "{5F0002A4-BACE-4097-A1B6-4350CEB9283F}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {5F0002A4-BACE-4097-A1B6-4350CEB9283F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {5F0002A4-BACE-4097-A1B6-4350CEB9283F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{03ED5619-5F9E-4CC6-8B8F-7D610C3169EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{03ED5619-5F9E-4CC6-8B8F-7D610C3169EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{03ED5619-5F9E-4CC6-8B8F-7D610C3169EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
diff --git a/Discord.Addons.Hosting/Discord.Addons.Hosting.csproj b/Discord.Addons.Hosting/Discord.Addons.Hosting.csproj
index 42e509d..2e06711 100644
--- a/Discord.Addons.Hosting/Discord.Addons.Hosting.csproj
+++ b/Discord.Addons.Hosting/Discord.Addons.Hosting.csproj
@@ -1,9 +1,9 @@
- net6.0
+ net6.0;net8.0Discord.Addons.Hosting
- 5.2.0
+ 6.0.0HawxySimplifying Discord.Net hosting with .NET Generic Host (Microsoft.Extensions.Hosting)true
@@ -12,7 +12,7 @@
https://github.com/Hawxy/Discord.Addons.Hostinggiticon.png
- Hawxy 2018-2023
+ Hawxy 2018-2024truediscord,discord.net,addon,hosting,microsoft.extensions.hostingEnable
@@ -21,9 +21,17 @@
-
-
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Discord.Addons.Hosting/DiscordClientService.cs b/Discord.Addons.Hosting/DiscordClientService.cs
index 9db82b7..cb82ab3 100644
--- a/Discord.Addons.Hosting/DiscordClientService.cs
+++ b/Discord.Addons.Hosting/DiscordClientService.cs
@@ -1,7 +1,7 @@
#region License
/*
- Copyright 2019-2022 Hawxy
+ Copyright 2019-2024 Hawxy
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/Discord.Addons.Hosting/DiscordHostBuilderExtensions.cs b/Discord.Addons.Hosting/DiscordHostBuilderExtensions.cs
index 78a4cef..9ab2d0c 100644
--- a/Discord.Addons.Hosting/DiscordHostBuilderExtensions.cs
+++ b/Discord.Addons.Hosting/DiscordHostBuilderExtensions.cs
@@ -1,6 +1,6 @@
#region License
/*
- Copyright 2019-2022 Hawxy
+ Copyright 2019-2024 Hawxy
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -16,19 +16,15 @@ limitations under the License.
*/
#endregion
-using Discord.Addons.Hosting.Injectables;
-using Discord.Addons.Hosting.Services;
-using Discord.Addons.Hosting.Util;
using Discord.Commands;
using Discord.Interactions;
using Discord.WebSocket;
-using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
namespace Discord.Addons.Hosting;
///
-/// Extends with Discord.Net configuration methods.
+/// Extensions with Discord.Net configuration options.
///
public static class DiscordHostBuilderExtensions
{
@@ -42,16 +38,13 @@ public static class DiscordHostBuilderExtensions
/// The delegate for the that will be used to configure the host.
/// The generic host builder.
/// Thrown if client is already added to the service collection
- public static IHostBuilder ConfigureDiscordShardedHost(this IHostBuilder builder, Action? config = null)
+ [Obsolete("This extension is obsolete and will be removed in a future version. Replace with builder.Services.AddDiscordShardedHost. See the Discord.Addons.Hosting repository for more information.")]
+ public static IHostBuilder ConfigureDiscordShardedHost(this IHostBuilder builder, Action config)
{
- builder.ConfigureDiscordHostInternal(config);
-
- return builder.ConfigureServices((_, collection) =>
+ ArgumentNullException.ThrowIfNull(config);
+ return builder.ConfigureServices((context, collection) =>
{
- if (collection.Any(x => x.ServiceType.BaseType == typeof(BaseSocketClient)))
- throw new InvalidOperationException("Cannot add more than one Discord Client to host");
-
- collection.AddSingleton();
+ collection.AddDiscordShardedHost((hostConfig, _) => config(context, hostConfig));
});
}
@@ -65,44 +58,14 @@ public static IHostBuilder ConfigureDiscordShardedHost(this IHostBuilder builder
/// The delegate for the that will be used to configure the host.
/// The generic host builder.
/// Thrown if client is already added to the service collection
- public static IHostBuilder ConfigureDiscordHost(this IHostBuilder builder, Action? config = null)
+ [Obsolete("This extension is obsolete and will be removed in a future version. Replace with builder.Services.AddDiscordHost. See the Discord.Addons.Hosting repository for more information.")]
+ public static IHostBuilder ConfigureDiscordHost(this IHostBuilder builder, Action config)
{
- builder.ConfigureDiscordHostInternal(config);
-
- return builder.ConfigureServices((_, collection) =>
- {
- if (collection.Any(x => x.ServiceType.BaseType == typeof(BaseSocketClient)))
- throw new InvalidOperationException("Cannot add more than one Discord Client to host");
-
- collection.AddSingleton();
- });
- }
-
- private static void ConfigureDiscordHostInternal(this IHostBuilder builder, Action? config = null) where T: BaseSocketClient
- {
- builder.ConfigureServices((context, collection) =>
+ ArgumentNullException.ThrowIfNull(config);
+ return builder.ConfigureServices((context, collection) =>
{
- collection.AddOptions().Validate(x => ValidateToken(x.Token));
-
- if (config != null)
- collection.Configure(x => config(context, x));
-
- collection.AddSingleton(typeof(LogAdapter<>));
- collection.AddHostedService>();
+ collection.AddDiscordHost((hostConfig, _) => config(context, hostConfig));
});
-
- static bool ValidateToken(string token)
- {
- try
- {
- TokenUtils.ValidateToken(TokenType.Bot, token);
- return true;
- }
- catch (Exception e) when (e is ArgumentNullException or ArgumentException)
- {
- return false;
- }
- }
}
///
@@ -111,7 +74,9 @@ static bool ValidateToken(string token)
/// The host builder to configure.
/// The (generic) host builder.
/// Thrown if is already added to the collection
- public static IHostBuilder UseCommandService(this IHostBuilder builder) => builder.UseCommandService((context, config) => { });
+ [Obsolete("This extension is obsolete and will be removed in a future version. Replace with builder.Services.AddCommandService. See the Discord.Addons.Hosting repository for more information.")]
+ public static IHostBuilder UseCommandService(this IHostBuilder builder) =>
+ builder.ConfigureServices((_, collection) => collection.AddCommandService());
///
/// Adds a instance to the host for use with a Discord.NET client. />
@@ -124,19 +89,13 @@ static bool ValidateToken(string token)
/// The (generic) host builder.
/// Thrown if config is null
/// Thrown if is already added to the collection
+ [Obsolete("This extension is obsolete and will be removed in a future version. Replace with builder.Services.AddCommandService. See the Discord.Addons.Hosting repository for more information.")]
public static IHostBuilder UseCommandService(this IHostBuilder builder, Action config)
{
ArgumentNullException.ThrowIfNull(config);
-
builder.ConfigureServices((context, collection) =>
{
- if (collection.Any(x => x.ServiceType == typeof(CommandService)))
- throw new InvalidOperationException("Cannot add more than one CommandService to host");
-
- collection.Configure(x => config(context, x));
-
- collection.AddSingleton();
- collection.AddHostedService();
+ collection.AddCommandService((commandServiceConfig, _) => config(context, commandServiceConfig));
});
return builder;
@@ -148,7 +107,12 @@ public static IHostBuilder UseCommandService(this IHostBuilder builder, ActionThe host builder to configure.
/// The (generic) host builder.
/// Thrown if is already added to the collection
- public static IHostBuilder UseInteractionService(this IHostBuilder builder) => builder.UseInteractionService((context, config) => { });
+ [Obsolete("This extension is obsolete and will be removed in a future version. Replace with builder.Services.AddInteractionService. See the Discord.Addons.Hosting repository for more information.")]
+ public static IHostBuilder UseInteractionService(this IHostBuilder builder) => builder.ConfigureServices(
+ (_, collection) =>
+ {
+ collection.AddInteractionService();
+ });
///
@@ -162,19 +126,14 @@ public static IHostBuilder UseCommandService(this IHostBuilder builder, ActionThe (generic) host builder.
/// Thrown if config is null
/// Thrown if is already added to the collection
+ [Obsolete("This extension is obsolete and will be removed in a future version. Replace with builder.Services.AddInteractionService. See the Discord.Addons.Hosting repository for more information.")]
public static IHostBuilder UseInteractionService(this IHostBuilder builder, Action config)
{
ArgumentNullException.ThrowIfNull(config);
builder.ConfigureServices((context, collection) =>
{
- if (collection.Any(x => x.ServiceType == typeof(InteractionService)))
- throw new InvalidOperationException("Cannot add more than one InteractionService to host");
-
- collection.Configure(x => config(context, x));
-
- collection.AddSingleton();
- collection.AddHostedService();
+ collection.AddInteractionService((interactionConfig, _) => config(context, interactionConfig));
});
return builder;
diff --git a/Discord.Addons.Hosting/DiscordHostConfiguration.cs b/Discord.Addons.Hosting/DiscordHostConfiguration.cs
index 9eb7a73..fb4c443 100644
--- a/Discord.Addons.Hosting/DiscordHostConfiguration.cs
+++ b/Discord.Addons.Hosting/DiscordHostConfiguration.cs
@@ -1,6 +1,6 @@
#region License
/*
- Copyright 2019-2022 Hawxy
+ Copyright 2019-2024 Hawxy
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/Discord.Addons.Hosting/Injectables/InjectableCommandService.cs b/Discord.Addons.Hosting/Injectables/InjectableCommandService.cs
index 4bb7418..47ce9cf 100644
--- a/Discord.Addons.Hosting/Injectables/InjectableCommandService.cs
+++ b/Discord.Addons.Hosting/Injectables/InjectableCommandService.cs
@@ -1,6 +1,6 @@
#region License
/*
- Copyright 2019-2022 Hawxy
+ Copyright 2019-2024 Hawxy
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/Discord.Addons.Hosting/Injectables/InjectableDiscordClient.cs b/Discord.Addons.Hosting/Injectables/InjectableDiscordClient.cs
index 3a304e9..d624d59 100644
--- a/Discord.Addons.Hosting/Injectables/InjectableDiscordClient.cs
+++ b/Discord.Addons.Hosting/Injectables/InjectableDiscordClient.cs
@@ -1,6 +1,6 @@
#region License
/*
- Copyright 2019-2022 Hawxy
+ Copyright 2019-2024 Hawxy
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/Discord.Addons.Hosting/Injectables/InjectableInteractionService.cs b/Discord.Addons.Hosting/Injectables/InjectableInteractionService.cs
index f41f2a3..c95172b 100644
--- a/Discord.Addons.Hosting/Injectables/InjectableInteractionService.cs
+++ b/Discord.Addons.Hosting/Injectables/InjectableInteractionService.cs
@@ -1,6 +1,6 @@
#region License
/*
- Copyright 2019-2022 Hawxy
+ Copyright 2019-2024 Hawxy
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/Discord.Addons.Hosting/ServiceCollectionExtensions.cs b/Discord.Addons.Hosting/ServiceCollectionExtensions.cs
new file mode 100644
index 0000000..01a7e48
--- /dev/null
+++ b/Discord.Addons.Hosting/ServiceCollectionExtensions.cs
@@ -0,0 +1,155 @@
+#region License
+/*
+ Copyright 2019-2024 Hawxy
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
+#endregion
+using Discord.Addons.Hosting.Injectables;
+using Discord.Addons.Hosting.Services;
+using Discord.Addons.Hosting.Util;
+using Discord.Commands;
+using Discord.Interactions;
+using Discord.WebSocket;
+using Microsoft.Extensions.DependencyInjection;
+
+namespace Discord.Addons.Hosting;
+
+///
+/// Extensions for registering Discord.NET services with
+///
+public static class ServiceCollectionExtensions
+{
+ ///
+ /// Adds and optionally configures a along with the required services.
+ ///
+ ///
+ /// A is supplied so you can pull data from additional services if required.
+ ///
+ /// The service collection to configure.
+ /// The delegate for the that will be used to configure the host.
+ /// Thrown if client is already added to the service collection
+ public static void AddDiscordShardedHost(this IServiceCollection collection, Action config)
+ {
+ collection.AddDiscordHostInternal(config);
+
+ if (collection.Any(x => x.ServiceType.BaseType == typeof(BaseSocketClient)))
+ throw new InvalidOperationException("Cannot add more than one Discord Client to host");
+
+ collection.AddSingleton();
+ }
+
+ ///
+ /// Adds and optionally configures a along with the required services.
+ ///
+ ///
+ /// A is supplied so you can pull data from additional services if required.
+ ///
+ /// The host builder to configure.
+ /// The delegate for the that will be used to configure the host.
+ /// Thrown if client is already added to the service collection
+ public static void AddDiscordHost(this IServiceCollection builder, Action config)
+ {
+ builder.AddDiscordHostInternal(config);
+
+ if (builder.Any(x => x.ServiceType.BaseType == typeof(BaseSocketClient)))
+ throw new InvalidOperationException("Cannot add more than one Discord Client to host");
+
+ builder.AddSingleton();
+ }
+
+ private static void AddDiscordHostInternal(this IServiceCollection collection, Action config) where T: BaseSocketClient
+ {
+ collection.AddOptions()
+ .Configure(config)
+ .Validate(x => ValidateToken(x.Token), "Provided bot token is invalid or missing");
+
+ collection.AddSingleton(typeof(LogAdapter<>));
+ collection.AddHostedService>();
+
+ static bool ValidateToken(string token)
+ {
+ try
+ {
+ TokenUtils.ValidateToken(TokenType.Bot, token);
+ return true;
+ }
+ catch (Exception e) when (e is ArgumentNullException or ArgumentException)
+ {
+ return false;
+ }
+ }
+ }
+
+ ///
+ /// Adds a instance to the host for use with a Discord.NET client. />
+ ///
+ /// The service collection to configure.
+ /// Thrown if is already added to the collection
+ public static void AddCommandService(this IServiceCollection collection) => collection.AddCommandService((context, config) => { });
+
+ ///
+ /// Adds a instance to the host for use with a Discord.NET client. />
+ ///
+ ///
+ /// A is supplied so you can pull data from additional services if required.
+ ///
+ /// The service collection to configure.
+ /// The delegate for configuring the that will be used to initialise the service.
+ /// Thrown if config is null
+ /// Thrown if is already added to the collection
+ public static void AddCommandService(this IServiceCollection collection, Action config)
+ {
+ ArgumentNullException.ThrowIfNull(config);
+
+ if (collection.Any(x => x.ServiceType == typeof(CommandService)))
+ throw new InvalidOperationException("Cannot add more than one CommandService to host");
+
+ collection.AddOptions().Configure(config);
+
+ collection.AddSingleton();
+ collection.AddHostedService();
+ }
+
+ ///
+ /// Adds a instance to the host for use with a Discord.NET client. />
+ ///
+ /// The service collection to configure.
+ /// Thrown if is already added to the collection
+ public static void AddInteractionService(this IServiceCollection collection) => collection.AddInteractionService((_, _) => { });
+
+
+ ///
+ /// Adds a instance to the host for use with a Discord.NET client. />
+ ///
+ ///
+ /// A is supplied so you can pull data from additional services if required.
+ ///
+ /// The service collection to configure.
+ /// The delegate for configuring the that will be used to initialise the service.
+ /// Thrown if config is null
+ /// Thrown if is already added to the collection
+ public static void AddInteractionService(this IServiceCollection collection, Action config)
+ {
+ ArgumentNullException.ThrowIfNull(config);
+
+ if (collection.Any(x => x.ServiceType == typeof(InteractionService)))
+ throw new InvalidOperationException("Cannot add more than one InteractionService to host");
+
+ collection.AddOptions().Configure(config);
+
+ collection.AddSingleton();
+ collection.AddHostedService();
+
+ }
+}
\ No newline at end of file
diff --git a/Discord.Addons.Hosting/Services/CommandServiceRegistrationHost.cs b/Discord.Addons.Hosting/Services/CommandServiceRegistrationHost.cs
index 4a394a5..e687302 100644
--- a/Discord.Addons.Hosting/Services/CommandServiceRegistrationHost.cs
+++ b/Discord.Addons.Hosting/Services/CommandServiceRegistrationHost.cs
@@ -1,6 +1,6 @@
#region License
/*
- Copyright 2019-2022 Hawxy
+ Copyright 2019-2024 Hawxy
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/Discord.Addons.Hosting/Services/DiscordHostedService.cs b/Discord.Addons.Hosting/Services/DiscordHostedService.cs
index 51b34cd..bcbd9f9 100644
--- a/Discord.Addons.Hosting/Services/DiscordHostedService.cs
+++ b/Discord.Addons.Hosting/Services/DiscordHostedService.cs
@@ -1,6 +1,6 @@
#region License
/*
- Copyright 2019-2022 Hawxy
+ Copyright 2019-2024 Hawxy
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/Discord.Addons.Hosting/Services/InteractionServiceRegistrationHost.cs b/Discord.Addons.Hosting/Services/InteractionServiceRegistrationHost.cs
index 4dbc7fa..62d143d 100644
--- a/Discord.Addons.Hosting/Services/InteractionServiceRegistrationHost.cs
+++ b/Discord.Addons.Hosting/Services/InteractionServiceRegistrationHost.cs
@@ -1,6 +1,6 @@
#region License
/*
- Copyright 2019-2022 Hawxy
+ Copyright 2019-2024 Hawxy
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/Discord.Addons.Hosting/Util/LogAdapter.cs b/Discord.Addons.Hosting/Util/LogAdapter.cs
index 130d8a1..ff2950b 100644
--- a/Discord.Addons.Hosting/Util/LogAdapter.cs
+++ b/Discord.Addons.Hosting/Util/LogAdapter.cs
@@ -1,6 +1,6 @@
#region License
/*
- Copyright 2019-2022 Hawxy
+ Copyright 2019-2024 Hawxy
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/Discord.Addons.Hosting/Util/ShardedClientExtensions.cs b/Discord.Addons.Hosting/Util/ShardedClientExtensions.cs
index a1d9e54..ca3c79c 100644
--- a/Discord.Addons.Hosting/Util/ShardedClientExtensions.cs
+++ b/Discord.Addons.Hosting/Util/ShardedClientExtensions.cs
@@ -1,6 +1,6 @@
#region License
/*
- Copyright 2019-2022 Hawxy
+ Copyright 2019-2024 Hawxy
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
diff --git a/Discord.Addons.Hosting/Util/SocketClientExtensions.cs b/Discord.Addons.Hosting/Util/SocketClientExtensions.cs
index 9952a8c..c62d03f 100644
--- a/Discord.Addons.Hosting/Util/SocketClientExtensions.cs
+++ b/Discord.Addons.Hosting/Util/SocketClientExtensions.cs
@@ -1,6 +1,6 @@
#region License
/*
- Copyright 2019-2022 Hawxy
+ Copyright 2019-2024 Hawxy
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -50,7 +50,7 @@ public static Task WaitForReadyAsync(this DiscordSocketClient client, Cancellati
internal static void RegisterSocketClientReady(this DiscordSocketClient client)
{
_socketTcs = new TaskCompletionSource