Comments (3)
The data I was looking for is in the body
argument of the event callback function. This is documented here: https://slack.dev/bolt-js/reference#listener-function-arguments-listener-function-arguments
from bolt-js.
Hi @travishoop - You're not receiving an event_id
as described here? I see here that the event
is a separate field and does not contain the event id. I wonder if that's what you're seeing when you inspect the event
argument passed to the listener by bolt. What happens if you declare payload
and look at it's contexts>
from bolt-js.
These are the values I get back:
Received Message Event with values
message
{
client_msg_id: '1043f866-380c-4dd0-acf2-dd9091e81d58',
type: 'message',
text: 'this is a test message I am sending to a public channel',
user: 'U04L3ME6VMY',
ts: '1708725482.598159',
blocks: [ { type: 'rich_text', block_id: 'CTnf8', elements: [Array] } ],
team: 'T03NC3TG00J',
channel: 'C04LQVA1Z2P',
event_ts: '1708725482.598159',
channel_type: 'channel'
} context
{
userToken: 'xoxp-<redacted>',
teamId: 'T03NC3TG00J',
botToken: 'xoxb-<redacted>',
botId: 'B06E96VAW84',
botUserId: 'U06E043Q48N',
userId: 'U04L3ME6VMY',
isEnterpriseInstall: false,
retryNum: 2,
retryReason: 'http_timeout',
updateConversation: [Function (anonymous)]
} event
{
client_msg_id: '1043f866-380c-4dd0-acf2-dd9091e81d58',
type: 'message',
text: 'this is a test message I am sending to a public channel',
user: 'U04L3ME6VMY',
ts: '1708725482.598159',
blocks: [ { type: 'rich_text', block_id: 'CTnf8', elements: [Array] } ],
team: 'T03NC3TG00J',
channel: 'C04LQVA1Z2P',
event_ts: '1708725482.598159',
channel_type: 'channel'
} payload
{
client_msg_id: '1043f866-380c-4dd0-acf2-dd9091e81d58',
type: 'message',
text: 'this is a test message I am sending to a public channel',
user: 'U04L3ME6VMY',
ts: '1708725482.598159',
blocks: [ { type: 'rich_text', block_id: 'CTnf8', elements: [Array] } ],
team: 'T03NC3TG00J',
channel: 'C04LQVA1Z2P',
event_ts: '1708725482.598159',
channel_type: 'channel'
}
Looks like the main payload argument is just getting put in all those fields but no envelope meta data is available.
Not sure if that event_ts value can be used in place of event_context
. I was assuming that is a different field.
from bolt-js.
Related Issues (20)
- Slack Bot works in my workspace, but doesn't respond when Installed elsewhere HOT 21
- AWS Lambda - Slack bolt error on starting AWSLabmdaReceiver HOT 3
- How to build dynamic form HOT 1
- issue in getting bot token HOT 6
- Application not working.........!!!!! HOT 1
- confusions over http method of running slack application HOT 13
- More clearly surface documentation on how to use Bolt.js with HTTP event delivery HOT 3
- custom routes not working HOT 6
- @slack/[email protected] incompatible engine Node 16 HOT 2
- Is there a way to obtain the "text" or "mrkdwn" version of a rich_text_input? HOT 3
- Aws lambda handler not working with oauth express handler HOT 6
- Receiving `reaction_added` events for channels we're not in HOT 3
- Open Modal API is not working suddenly. And error message is `Error: An API error occurred: invalid_trigger_id`. HOT 9
- Cannot post a message as a user via an application/bot HOT 7
- [ERROR] bolt-app no more than 100 items allowed [json-pointer:/view/blocks/0/element/options] HOT 13
- Unhandled request to /slack/install HOT 6
- Unhandled error log when user is not authorized HOT 8
- Cannot access the files in the "app_mention" event with TypeScript HOT 3
- How to get search params in custom routes HOT 4
- appToken is not read in socketMode @3.18.0 HOT 4
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 bolt-js.