InputFile
An Input
wraps a number of different sources for sending files.
It corresponds to the Input
type in the Telegram Bot API Reference.
Constructors
ts
InputFile(file: MaybeSupplier<string | Blob | Deno.FsFile | Response | URL | URLLike | Uint8Array | ReadableStream<Uint8Array> | Iterable<Uint8Array> | AsyncIterable<Uint8Array>>, filename?: string);
Constructs an Input
that can be used in the API to send files.
Properties
filename
ts
readonly filename?: string;
Optional name of the constructed Input
instance.
Check out the documentation on sending files with Input
.
Methods
toRaw
ts
toRaw(): Promise<Uint8Array | Iterable<Uint8Array> | AsyncIterable<Uint8Array>>;
Internal method. Do not use.
Converts this instance into a binary representation that can be sent to the Bot API server in the request body.