Table of Contents

Method GetOldValue

Namespace
DisCatSharp.Entities
Assembly
DisCatSharp.dll

GetOldValue<T>()

Converts the old raw value to the specified type.

public T? GetOldValue<T>()

Returns

T

The converted value, or the default value of T when no old value exists.

Type Parameters

T

The 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.