mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
Add setting channel overwrites
This commit is contained in:
@@ -38,7 +38,7 @@ class ClientDataResolver {
|
||||
if (user instanceof User) {
|
||||
return user;
|
||||
} else if ($string(user)) {
|
||||
return this.client.users.get(user.id);
|
||||
return this.client.users.get(user);
|
||||
} else if (user instanceof Message) {
|
||||
return user.author;
|
||||
} else if (user instanceof Guild) {
|
||||
|
||||
@@ -284,6 +284,14 @@ class RESTMethods {
|
||||
});
|
||||
}
|
||||
|
||||
setChannelOverwrite(channel, payload) {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.rest.makeRequest('put', `${Constants.Endpoints.channelPermissions(channel.id)}/${payload.id}`, true, payload)
|
||||
.then(resolve)
|
||||
.catch(reject);
|
||||
});
|
||||
}
|
||||
|
||||
updateGuildRole(role, _data) {
|
||||
return new Promise((resolve, reject) => {
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user