Comments (8)
@gdcohan Finally I can get the attachments content with below code:
controller.on('bot_message', function(bot, message) {
console.log('message.attachments: ' + message.attachments);
var attachment = message.attachments[0];
console.log('attachments.title: ' + attachment.title);
console.log('attachments.text: ' + attachment.text);
});```
from botkit.
Finally I can use bot_message
event
controller.on('bot_message', function(bot, message) {
// Do something here
});
from botkit.
There was a problems that message.text always return null.
from botkit.
@ZuzooVn I was hitting this problem too..in my case, the bot was sending a message that had no text but an attachment field with a fallback in it..maybe yours is doing something like this too?
from botkit.
@gdcohan Me too, we can not get the text because the bot did not send any text. Can you get the text in the attachment in below image?
from botkit.
@gdcohan According to https://api.slack.com/events/message/bot_message, I think we can not get the attachments content.
from botkit.
Did bot_message
go away? I don't see it anywhere in the code and it's not fired when I receive a message from another bot.
from botkit.
@donavon The above code snippet works for me.
from botkit.
Related Issues (20)
- botkit 4.15.0 and Webex Adapter 1.0.10 are not on NPM HOT 1
- How to upload this Bot to Teams? HOT 2
- Bot can send, but not receive anymore HOT 2
- Botkit Webex API client not returning data HOT 1
- Question: Handling Websocket terminations HOT 1
- Uncatchable throws on botbuilder-adapter-webex registerWebhookSubscription Functions HOT 19
- Conversation become "duplicated" when running long operation HOT 1
- Help in Implementing the B2C Chatbot
- Webex Teams Adapter Doesn't Support direct_mention Event Type
- ☺
- BotkitConversation not executing when using axios but its executing fine when calling inside request?
- Cannot read property '1' of undefined
- Block Action Issue (when 'Clear Selection' is clicked)
- Can I message a pages followers with this??
- Remove deprecated request package
- Is project Dead? HOT 2
- Botkit
- Server Crash due to Missing Credentials in Slack Adapter
- npm install -g yo generator-botkit HOT 1
- Javascript heap out of memory issue after upgrading botkit from 0.6 to 4.15.0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from botkit.