Method ConvertArgument
- Namespace
- DisCatSharp.CommandsNext
- Assembly
- DisCatSharp.CommandsNext.dll
ConvertArgument<T>(string, CommandContext)
Converts a string to specified type.
public Task<T> ConvertArgument<T>(string value, CommandContext ctx)
Parameters
valuestringValue to convert.
ctxCommandContextContext in which to convert to.
Returns
- Task<T>
Converted object.
Type Parameters
TType to convert to.
ConvertArgument(string, CommandContext, Type)
Converts a string to specified type.
public Task<object> ConvertArgument(string value, CommandContext ctx, Type type)
Parameters
valuestringValue to convert.
ctxCommandContextContext in which to convert to.
typeTypeType to convert to.