mirror of
https://github.com/danbulant/discord.js
synced 2026-06-06 08:11:50 +00:00
fix(ClientApplication): createAsset incorrectly resolving image and posting
This commit is contained in:
parent
016526486c
commit
234648bd2a
1 changed files with 6 additions and 7 deletions
|
|
@ -166,13 +166,12 @@ class ClientApplication extends Base {
|
||||||
* @param {string} type Type of the asset. `big`, or `small`
|
* @param {string} type Type of the asset. `big`, or `small`
|
||||||
* @returns {Promise}
|
* @returns {Promise}
|
||||||
*/
|
*/
|
||||||
createAsset(name, data, type) {
|
async createAsset(name, data, type) {
|
||||||
return DataResolver.resolveBase64(data).then(b64 =>
|
return this.client.api.oauth2.applications(this.id).assets.post({ data: {
|
||||||
this.client.api.oauth2.applications(this.id).assets.post({ data: {
|
name,
|
||||||
name,
|
type: ClientApplicationAssetTypes[type.toUpperCase()],
|
||||||
data: b64,
|
image: await DataResolver.resolveImage(data),
|
||||||
type: ClientApplicationAssetTypes[type.toUpperCase()],
|
} });
|
||||||
} }));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue