Describe your issue here.
x in one of the [ ])x in each of the [ ])MessageEvent type mission user
package version: 3.1.1
node version: 14.1
OS version(s): MacOS 11.1
app.message("hello", async ({ message, say }) => { ... listener.message.userThe type of message argument should have the user property.
Property 'user' does not exist on type 'MessageEvent'.
Property 'user' does not exist on type 'MessageChangedEvent'.
import { App } from "@slack/bolt";
const app = new App({
token: process.env.SLACK_BOT_TOKEN,
signingSecret: process.env.SLACK_SIGNING_SECRET,
});
// Listens to incoming messages that contain "goodbye"
app.message("hello", async ({ message, say }) => {
// say() sends a message to the channel where the event was triggered
await say(`hello, <@${message.user}> :wave:`);
});
(async () => {
await app.start(process.env.PORT || 3000);
console.log("Bolt app is running!");
})();
Add assertion like this: (message as GenericMessageEvent).user
Hey @sunakane, thanks for taking the time to report this issue! It seems that you are right. This should be a bug introduced by https://github.com/slackapi/bolt-js/pull/709. The Slack team will fix this issue shortly but, if you are interested in making a pull request for this, we are happy to be reviewers on it 馃憢
Fixed by #782 - let me close this issue now.
Most helpful comment
Hey @sunakane, thanks for taking the time to report this issue! It seems that you are right. This should be a bug introduced by https://github.com/slackapi/bolt-js/pull/709. The Slack team will fix this issue shortly but, if you are interested in making a pull request for this, we are happy to be reviewers on it 馃憢