Method GetNewValue
- Namespace
- DisCatSharp.Entities
- Assembly
- DisCatSharp.dll
GetNewValue<T>()
Converts the new raw value to the specified type.
public T? GetNewValue<T>()
Returns
- T
The converted value, or the default value of
Twhen no new value exists.
Type Parameters
TThe target CLR type.
Remarks
Discord may change the shape of individual change values between actions, so callers should prefer nullable or defensive target types when reading undocumented keys.
Exceptions
- JsonException
Thrown when the raw token cannot be converted to
T.