Docs cleanup

This commit is contained in:
Crawl
2017-08-20 22:08:37 +02:00
parent c33b78da23
commit c7d1507e19
32 changed files with 287 additions and 267 deletions

View File

@@ -142,10 +142,10 @@ class GuildChannel extends Channel {
* @example
* // Overwrite permissions for a message author
* message.channel.overwritePermissions(message.author, {
* SEND_MESSAGES: false
* SEND_MESSAGES: false
* })
* .then(() => console.log('Done!'))
* .catch(console.error);
* .then(() => console.log('Done!'))
* .catch(console.error);
*/
overwritePermissions(userOrRole, options) {
const payload = {
@@ -206,8 +206,8 @@ class GuildChannel extends Channel {
* @example
* // Edit a channel
* channel.edit({name: 'new-channel'})
* .then(c => console.log(`Edited channel ${c}`))
* .catch(console.error);
* .then(c => console.log(`Edited channel ${c}`))
* .catch(console.error);
*/
edit(data) {
return this.client.rest.methods.updateChannel(this, data);
@@ -220,8 +220,8 @@ class GuildChannel extends Channel {
* @example
* // Set a new channel name
* channel.setName('not_general')
* .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))
* .catch(console.error);
* .then(newChannel => console.log(`Channel's new name is ${newChannel.name}`))
* .catch(console.error);
*/
setName(name) {
return this.edit({ name });
@@ -235,8 +235,8 @@ class GuildChannel extends Channel {
* @example
* // Set a new channel position
* channel.setPosition(2)
* .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))
* .catch(console.error);
* .then(newChannel => console.log(`Channel's new position is ${newChannel.position}`))
* .catch(console.error);
*/
setPosition(position, relative) {
return this.guild.setChannelPosition(this, position, relative).then(() => this);
@@ -249,8 +249,8 @@ class GuildChannel extends Channel {
* @example
* // Set a new channel topic
* channel.setTopic('needs more rate limiting')
* .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))
* .catch(console.error);
* .then(newChannel => console.log(`Channel's new topic is ${newChannel.topic}`))
* .catch(console.error);
*/
setTopic(topic) {
return this.client.rest.methods.updateChannel(this, { topic });