Reputation: 13697
I'd like to know is it possible to post a message with attachment, similar like I can add using Slack' action Code or text snippet, as the reply from my bot. Should I use bot.reply or maybe some other method?
Upvotes: 0
Views: 831
Reputation: 1191
You can upload through the files.upload API, using the Botkit interface, like so:
slackBot.api.files.upload({
file: fs.createReadStream('./codeForReview.js'),
channels: '#general',
initial_comment: 'Can you guys have a look at this please?',
title: 'Updated code',
});
Upvotes: 1