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