Summary
The issue is that inside the method it calls t.GetInterface() instead of t.GetInterfaces(), like it does in `AddCheck(Type t)
What version of the library are you using?
v5.0.0-nightly (make sure you are using the latest nightly!)
What .NET version are you using? Make sure to use the latest patch release for your major version.
.NET 9.0
Operating System
Windows 11 24H2
Reproduction Steps
- have one class implementing at least two
IContextCheck<T>
- try to register all checks using
extension.AddChecks(Assembly.GetExecutingAssembly()) or similar
Trace Logs
Exceptions or other error messages
System.Reflection.AmbiguousMatchException: Ambiguous match found for ' DSharpPlus.Commands.ContextChecks.IContextCheck`1[CompatBot.Commands.Attributes.LimitedToHelpChannelAttribute]'.
at System.RuntimeType.GetInterface(String fullname, Boolean ignoreCase)
at DSharpPlus.Commands.CommandsExtension.AddChecks(Assembly assembly)
at CompatBot.Program.<>c.<Main>b__4_1(IServiceProvider services, CommandsExtension extension) in E:\Work\git\discord-bot\CompatBot\Program.cs:line 156
Anything else you'd like to share
No response
Summary
The issue is that inside the method it calls
t.GetInterface()instead oft.GetInterfaces(), like it does in `AddCheck(Type t)What version of the library are you using?
v5.0.0-nightly (make sure you are using the latest nightly!)
What .NET version are you using? Make sure to use the latest patch release for your major version.
.NET 9.0
Operating System
Windows 11 24H2
Reproduction Steps
IContextCheck<T>extension.AddChecks(Assembly.GetExecutingAssembly())or similarTrace Logs
Exceptions or other error messages
Anything else you'd like to share
No response