sendFile with content

This commit is contained in:
abalabahaha
2016-04-13 10:50:03 -07:00
parent ecc35eecda
commit 9251fd01ce
2 changed files with 6 additions and 4 deletions

View File

@@ -611,7 +611,7 @@ export default class InternalClient {
}
// def sendFile
sendFile(where, _file, name) {
sendFile(where, _file, name, content) {
if (!name) {
if (_file instanceof String || typeof _file === "string") {
name = require("path").basename(_file);
@@ -629,7 +629,8 @@ export default class InternalClient {
.then(file =>
this.apiRequest("post", Endpoints.CHANNEL_MESSAGES(channel.id), true, null, {
name,
file
file,
content
}).then(res => channel.messages.add(new Message(res, channel, this.client)))
)
);