Remove all deprecated methods / props

This commit is contained in:
Crawl
2017-05-14 20:15:55 +02:00
parent 4422f2aa8a
commit ca926ee404
11 changed files with 3 additions and 317 deletions

View File

@@ -70,7 +70,7 @@ class Webhook {
}
/**
* Options that can be passed into send, sendMessage, sendFile, sendEmbed, and sendCode.
* Options that can be passed into send.
* @typedef {Object} WebhookMessageOptions
* @property {string} [username=this.name] Username override for the message
* @property {string} [avatarURL] Avatar URL override for the message
@@ -138,47 +138,6 @@ class Webhook {
return this.client.rest.methods.sendWebhookMessage(this, content, options);
}
/**
* Send a message with this webhook
* @param {StringResolvable} content The content to send
* @param {WebhookMessageOptions} [options={}] The options to provide
* @returns {Promise<Message|Message[]>}
* @deprecated
* @example
* // Send a message
* webhook.sendMessage('hello!')
* .then(message => console.log(`Sent message: ${message.content}`))
* .catch(console.error);
*/
sendMessage(content, options = {}) {
return this.send(content, options);
}
/**
* Send a file with this webhook.
* @param {BufferResolvable} attachment The file to send
* @param {string} [name='file.jpg'] The name and extension of the file
* @param {StringResolvable} [content] Text message to send with the attachment
* @param {WebhookMessageOptions} [options] The options to provide
* @returns {Promise<Message>}
* @deprecated
*/
sendFile(attachment, name, content, options = {}) {
return this.send(content, Object.assign(options, { file: { attachment, name } }));
}
/**
* Send a code block with this webhook.
* @param {string} lang Language for the code block
* @param {StringResolvable} content Content of the code block
* @param {WebhookMessageOptions} options The options to provide
* @returns {Promise<Message|Message[]>}
* @deprecated
*/
sendCode(lang, content, options = {}) {
return this.send(content, Object.assign(options, { code: lang }));
}
/**
* Send a raw slack message with this webhook.
* @param {Object} body The raw body to send