Table of Contents

Method StripTokensAndOptIdsInJson

Namespace
DisCatSharp
Assembly
DisCatSharp.dll

StripTokensAndOptIdsInJson(string?, bool)

Removes discord-based tokens and, optionally, embedded ids from JSON payload values while preserving non-ID strings and the original string when no replacements are needed.

public static string? StripTokensAndOptIdsInJson(string? str, bool stripIds)

Parameters

str string

The JSON payload to scrub.

stripIds bool

Whether to strip discord-based ids.

Returns

string

A new JSON string with tokens and optionally embedded Discord ids scrubbed.