mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 17:13:31 +01:00
Add sendFile function (#562)
* sendFile * Add default value to filename * eslint * (╯°□°)╯︵ ┻━┻
This commit is contained in:
@@ -41,7 +41,7 @@ class RESTMethods {
|
||||
});
|
||||
}
|
||||
|
||||
sendMessage($channel, content, tts, nonce) {
|
||||
sendMessage($channel, content, tts, nonce, file) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const $this = this;
|
||||
let channel = $channel;
|
||||
@@ -49,7 +49,7 @@ class RESTMethods {
|
||||
function req() {
|
||||
$this.rest.makeRequest('post', Constants.Endpoints.channelMessages(channel.id), true, {
|
||||
content, tts, nonce,
|
||||
})
|
||||
}, file)
|
||||
.then(data => resolve($this.rest.client.actions.MessageCreate.handle(data).m))
|
||||
.catch(reject);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user