send image without text

This commit is contained in:
loicbersier 2019-11-25 23:21:30 +01:00
parent cc3a34a50c
commit ea5d0a50de

View file

@ -122,11 +122,15 @@ class tweetCommand extends Command {
status: text status: text
}; };
if (data) { if (data && args.text) {
options = { options = {
status: text, status: text,
media_ids: new Array(data.media_id_string) media_ids: new Array(data.media_id_string)
}; };
} else if (data) {
options = {
media_ids: new Array(data.media_id_string)
};
} }
T.post('statuses/update', options, function (err, response) { T.post('statuses/update', options, function (err, response) {