GramIO API Reference / @gramio/contexts/dist / DownloadMixin
Class: DownloadMixin<Bot>
Defined in: contexts/index.d.ts:5416
This object represents a mixin that can be used to download media files
Extends
Context<Bot>.DownloadMixinMetadata
Extended by
Type Parameters
| Type Parameter |
|---|
Bot extends BotLike |
Constructors
Constructor
new DownloadMixin<
Bot>():DownloadMixin<Bot>
Returns
DownloadMixin<Bot>
Inherited from
Properties
| Property | Modifier | Type | Inherited from | Defined in |
|---|---|---|---|---|
bot | public | Bot | Context.bot | contexts/index.d.ts:4856 |
update? | public | TelegramUpdate | Context.update | contexts/index.d.ts:4858 |
updateId? | public | number | Context.updateId | contexts/index.d.ts:4857 |
updateType | protected | UpdateName | Context.updateType | contexts/index.d.ts:4859 |
Accessors
[toStringTag]
Get Signature
get [toStringTag]():
string
Defined in: contexts/index.d.ts:4862
Returns
string
Inherited from
attachment
Get Signature
get attachment():
Attachment
Defined in: contexts/index.d.ts:5413
Returns
Methods
download()
Call Signature
download():
Promise<ArrayBuffer>
Defined in: contexts/index.d.ts:5418
Downloads attachment
Returns
Promise<ArrayBuffer>
Call Signature
download(
path):Promise<string>
Defined in: contexts/index.d.ts:5419
Downloads attachment
Parameters
| Parameter | Type |
|---|---|
path | string |
Returns
Promise<string>
is()
is<
T>(rawTypes):this is InstanceType<ContextsMapping<Bot>[T]> & GetDerives<Bot, T> & (IsAny<Bot["__Derives"]> extends true ? {} : Bot["__Derives"] extends {} ? Bot["__Derives"]["global"] & Bot["__Derives"][T] : {})
Defined in: contexts/index.d.ts:4865
Type Parameters
| Type Parameter |
|---|
T extends UpdateName |
Parameters
| Parameter | Type |
|---|---|
rawTypes | MaybeArray<SoftString<T>> |
Returns
this is InstanceType<ContextsMapping<Bot>[T]> & GetDerives<Bot, T> & (IsAny<Bot["__Derives"]> extends true ? {} : Bot["__Derives"] extends {} ? Bot["__Derives"]["global"] & Bot["__Derives"][T] : {})