mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
Docs cleanup
This commit is contained in:
@@ -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 });
|
||||
|
||||
Reference in New Issue
Block a user