mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-15 19:13:31 +01:00
committed by
Schuyler Cebulskie
parent
e48d7d52f1
commit
5ddefc3682
@@ -587,9 +587,15 @@ class RESTMethods {
|
|||||||
}
|
}
|
||||||
|
|
||||||
editWebhook(webhook, name, avatar) {
|
editWebhook(webhook, name, avatar) {
|
||||||
return this.rest.makeRequest('patch', Constants.Endpoints.webhook(webhook.id, webhook.token), false, {
|
return new Promise((resolve, reject) => {
|
||||||
name,
|
this.rest.makeRequest('patch', Constants.Endpoints.webhook(webhook.id, webhook.token), false, {
|
||||||
avatar,
|
name,
|
||||||
|
avatar,
|
||||||
|
}).then(data => {
|
||||||
|
webhook.name = data.name;
|
||||||
|
webhook.avatar = data.avatar;
|
||||||
|
resolve(webhook);
|
||||||
|
}).catch(reject);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user