mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
fix(ClientApplication): createAsset incorrectly resolving image and posting
This commit is contained in:
@@ -166,13 +166,12 @@ class ClientApplication extends Base {
|
||||
* @param {string} type Type of the asset. `big`, or `small`
|
||||
* @returns {Promise}
|
||||
*/
|
||||
createAsset(name, data, type) {
|
||||
return DataResolver.resolveBase64(data).then(b64 =>
|
||||
this.client.api.oauth2.applications(this.id).assets.post({ data: {
|
||||
name,
|
||||
data: b64,
|
||||
type: ClientApplicationAssetTypes[type.toUpperCase()],
|
||||
} }));
|
||||
async createAsset(name, data, type) {
|
||||
return this.client.api.oauth2.applications(this.id).assets.post({ data: {
|
||||
name,
|
||||
type: ClientApplicationAssetTypes[type.toUpperCase()],
|
||||
image: await DataResolver.resolveImage(data),
|
||||
} });
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user