Browse Source

Merge d3b0d071e7 into 237ad0f867

pull/975/merge
Joe4evr GitHub 7 years ago
parent
commit
ab615184c3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      src/Discord.Net.Commands/CommandService.cs

+ 9
- 0
src/Discord.Net.Commands/CommandService.cs View File

@@ -319,6 +319,15 @@ namespace Discord.Commands
}
return null;
}
public void ReplaceDefaultTypereader<T>(TypeReader reader)
=> ReplaceDefaultTypereader(typeof(T), reader);
public void ReplaceDefaultTypereader(Type type, TypeReader reader)
{
if (_defaultTypeReaders.ContainsKey(type))
{
_defaultTypeReaders.AddOrUpdate(type, k => throw new Exception("This shouldn't happen?"), (k, v) => reader);
}
}

//Execution
public SearchResult Search(ICommandContext context, int argPos)


Loading…
Cancel
Save