-
-
Notifications
You must be signed in to change notification settings - Fork 240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat : string possibility with interact #1199
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -262,6 +262,11 @@ protected function getRecipientsAttribute(): Collection | |
return $recipients; | ||
} | ||
|
||
|
||
|
||
|
||
|
||
|
||
/** | ||
* Returns the guild attribute. | ||
* | ||
|
@@ -350,6 +355,25 @@ public function setPermissions(Part $part, array $allow = [], array $deny = [], | |
return $this->setOverwrite($part, $overwrite, $reason); | ||
} | ||
|
||
|
||
/** | ||
* Rename channel | ||
* | ||
* @param string $name | ||
* @return ExtendedPromiseInterface | ||
*/ | ||
public function rename(string $name): ExtendedPromiseInterface | ||
{ | ||
if ($this->name === $name) { | ||
return reject(new InvalidOverwriteException('The name is already set in the channel.')); | ||
} | ||
|
||
$this->name = $name; | ||
return $this->http->patch(Endpoint::bind(Endpoint::CHANNEL, $this->id),[ | ||
'name' => $this->name | ||
]); | ||
} | ||
|
||
Comment on lines
+360
to
+376
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be in a separate PR There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I disagree with this, there is already people would make multiple different http calls just to update a channel information |
||
/** | ||
* Sets an overwrite to the channel. | ||
* | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why ?