Creates an instance of TelegramError.
The error code from the enum ErrorCodes.
Optionalparams: Record<string, any>An object containing values to replace placeholders in the error message.
OptionalstackStatic OptionalprepareOptional override for formatting stack traces
Staticstack
Represents a generic error from the Telegram API. This error class extends the standard
Errorobject and includes additional properties for error code and description.