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

@@ -57,8 +57,8 @@ class Message {
this.author = this.client.dataManager.newUser(data.author);
/**
* Represents the author of the message as a guild member. Only available if the message comes from a guild
* where the author is still a member.
* Represents the author of the message as a guild member
* Only available if the message comes from a guild where the author is still a member
* @type {?GuildMember}
*/
this.member = this.guild ? this.guild.member(this.author) || null : null;
@@ -209,8 +209,8 @@ class Message {
}
/**
* The message contents with all mentions replaced by the equivalent text. If mentions cannot be resolved to a name,
* the relevant mention in the message content will not be converted
* The message contents with all mentions replaced by the equivalent text.
* If mentions cannot be resolved to a name, the relevant mention in the message content will not be converted.
* @type {string}
* @readonly
*/
@@ -254,8 +254,8 @@ class Message {
* @example
* // Create a reaction collector
* const collector = message.createReactionCollector(
* (reaction, user) => reaction.emoji.name === '👌' && user.id === 'someID',
* { time: 15000 }
* (reaction, user) => reaction.emoji.name === '👌' && user.id === 'someID',
* { time: 15000 }
* );
* collector.on('collect', r => console.log(`Collected ${r.emoji.name}`));
* collector.on('end', collected => console.log(`Collected ${collected.size} items`));
@@ -271,8 +271,8 @@ class Message {
*/
/**
* Similar to createCollector but in promise form. Resolves with a collection of reactions that pass the specified
* filter.
* Similar to createCollector but in promise form.
* Resolves with a collection of reactions that pass the specified filter.
* @param {CollectorFilter} filter The filter function to use
* @param {AwaitReactionsOptions} [options={}] Optional options to pass to the internal collector
* @returns {Promise<Collection<string, MessageReaction>>}
@@ -370,8 +370,8 @@ class Message {
* @example
* // Update the content of a message
* message.edit('This is my new content!')
* .then(msg => console.log(`Updated the content of a message from ${msg.author}`))
* .catch(console.error);
* .then(msg => console.log(`Updated the content of a message from ${msg.author}`))
* .catch(console.error);
*/
edit(content, options) {
if (!options && typeof content === 'object' && !(content instanceof Array)) {
@@ -438,8 +438,8 @@ class Message {
* @example
* // Delete a message
* message.delete()
* .then(msg => console.log(`Deleted message from ${msg.author}`))
* .catch(console.error);
* .then(msg => console.log(`Deleted message from ${msg.author}`))
* .catch(console.error);
*/
delete(timeout = 0) {
if (timeout <= 0) {
@@ -461,8 +461,8 @@ class Message {
* @example
* // Reply to a message
* message.reply('Hey, I\'m a reply!')
* .then(msg => console.log(`Sent a reply to ${msg.author}`))
* .catch(console.error);
* .then(msg => console.log(`Sent a reply to ${msg.author}`))
* .catch(console.error);
*/
reply(content, options) {
if (!options && typeof content === 'object' && !(content instanceof Array)) {