Feature: Component TypeConverters and CustomID TypeReaders (#2169)
* fix sharded client current user * add custom setter to group property of module builder * rename serilazation method * init * create typemap and default typereaders * add default readers * create typereader targetting flags * seperate custom id readers with component typeconverters * add typereaders * add customid readers * clean up component info argument parsing * remove obsolete method * add component typeconverters to modals * fix build errors * add inline docs * bug fixes * code cleanup and refactorings * fix build errors * add GenerateCustomIdString method to interaction service * add GenerateCustomIdString method to interaction service * add inline docs to componentparameterbuilder * add inline docs to GenerateCustomIdStringAsync method
This commit is contained in:
12
src/Discord.Net.Interactions/Entities/ITypeConverter.cs
Normal file
12
src/Discord.Net.Interactions/Entities/ITypeConverter.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Discord.Interactions
|
||||
{
|
||||
internal interface ITypeConverter<T>
|
||||
{
|
||||
public bool CanConvertTo(Type type);
|
||||
|
||||
public Task<TypeConverterResult> ReadAsync(IInteractionContext context, T option, IServiceProvider services);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user