mirror of
https://github.com/danbulant/discord.js
synced 2026-07-05 11:10:38 +00:00
Webpack build for branch master: aaa92c0b05
This commit is contained in:
parent
70bf0dcc0f
commit
f4cba51550
2 changed files with 5 additions and 4 deletions
|
|
@ -8206,11 +8206,12 @@ class ClientApplication extends Base {
|
||||||
* @returns {Promise<Object>}
|
* @returns {Promise<Object>}
|
||||||
*/
|
*/
|
||||||
fetchAssets() {
|
fetchAssets() {
|
||||||
return this.client.api.applications(this.id).assets.get()
|
const types = Object.keys(ClientApplicationAssetTypes);
|
||||||
|
return this.client.api.oauth2.applications(this.id).assets.get()
|
||||||
.then(assets => assets.map(a => ({
|
.then(assets => assets.map(a => ({
|
||||||
id: a.id,
|
id: a.id,
|
||||||
name: a.name,
|
name: a.name,
|
||||||
type: Object.keys(ClientApplicationAssetTypes)[a.type - 1],
|
type: types[a.type - 1],
|
||||||
})));
|
})));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -8223,7 +8224,7 @@ class ClientApplication extends Base {
|
||||||
*/
|
*/
|
||||||
createAsset(name, data, type) {
|
createAsset(name, data, type) {
|
||||||
return DataResolver.resolveBase64(data).then(b64 =>
|
return DataResolver.resolveBase64(data).then(b64 =>
|
||||||
this.client.api.applications(this.id).assets.post({ data: {
|
this.client.api.oauth2.applications(this.id).assets.post({ data: {
|
||||||
name,
|
name,
|
||||||
data: b64,
|
data: b64,
|
||||||
type: ClientApplicationAssetTypes[type.toUpperCase()],
|
type: ClientApplicationAssetTypes[type.toUpperCase()],
|
||||||
|
|
|
||||||
2
discord.master.min.js
vendored
2
discord.master.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue