Class InteractionFormatter
Inheritance
InteractionFormatter
Namespace: Discord.Converter
Assembly: Discord.dll
public static class InteractionFormatter
Methods
Declaration
public static T GetEnumFromId<T>(string value)
Parameters
| Type |
Name |
Description |
| string |
value |
|
Returns
Type Parameters
Declaration
public static T GetFirstEnumFromId<T>(ref string[] values)
Parameters
| Type |
Name |
Description |
| string[] |
values |
|
Returns
Type Parameters
Declaration
public static T GetFirstEnumFromIdAndRemove<T>(ref string[] values)
Parameters
| Type |
Name |
Description |
| string[] |
values |
|
Returns
Type Parameters
Declaration
public static string TransformEnumsToId(params Enum[] enums)
Parameters
| Type |
Name |
Description |
| Enum[] |
enums |
|
Returns
Transforms the given values to the given enums. CAUTION: The length of the given strings and enums must be the same.
Declaration
public static IEnumerable<Enum> TransformIdToEnums(string value, params Type[] enums)
Parameters
| Type |
Name |
Description |
| string |
value |
The list of values separated by comma (e.g. "0,5,3")
|
| Type[] |
enums |
The list of enums that should be given out (e.g. typeof(Enum), typeof(Enum)"/>
|
Returns
| Type |
Description |
| IEnumerable<Enum> |
A list of converted enums that were passed in.
|
Exceptions