GramIO API Reference / @gramio/contexts/dist / DownloadMixin
Class: DownloadMixin<Bot>
Defined in: contexts/index.d.ts:5282
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:4726 |
update? | public | TelegramUpdate | Context.update | contexts/index.d.ts:4728 |
updateId? | public | number | Context.updateId | contexts/index.d.ts:4727 |
updateType | protected | UpdateName | Context.updateType | contexts/index.d.ts:4729 |
Accessors
[toStringTag]
Get Signature
get [toStringTag]():
string
Defined in: contexts/index.d.ts:4732
Returns
string
Inherited from
attachment
Get Signature
get attachment():
Attachment
Defined in: contexts/index.d.ts:5279
Returns
Methods
download()
Call Signature
download():
Promise<ArrayBuffer>
Defined in: contexts/index.d.ts:5284
Downloads attachment
Returns
Promise<ArrayBuffer>
Call Signature
download(
path):Promise<string>
Defined in: contexts/index.d.ts:5285
Downloads attachment
Parameters
| Parameter | Type |
|---|---|
path | string |
Returns
Promise<string>
is()
is<
T>(rawTypes):this is InstanceType<ContextsMapping<Bot>[T]> & Bot["__Derives"]["global"] & Bot["__Derives"][T] & (Bot["__Derives"] extends {} ? Bot["__Derives"]["global"] & Bot["__Derives"][T] : {})
Defined in: contexts/index.d.ts:4735
Type Parameters
| Type Parameter |
|---|
T extends UpdateName |
Parameters
| Parameter | Type |
|---|---|
rawTypes | MaybeArray<SoftString<T>> |
Returns
this is InstanceType<ContextsMapping<Bot>[T]> & Bot["__Derives"]["global"] & Bot["__Derives"][T] & (Bot["__Derives"] extends {} ? Bot["__Derives"]["global"] & Bot["__Derives"][T] : {})