This repository was archived by the owner on Sep 20, 2024. It is now read-only.
This repository was archived by the owner on Sep 20, 2024. It is now read-only.
MS Teams: Property 'api' does not exist on type 'BotWorker' #2201
Open
Description
I need to get the user email. I am trying to run the following feature from the docs:
controller.hears('who am i', 'direct_message, direct_mention', function(bot, message) {
bot.api.getUserById(message.channel, message.user, function(err, user) {
if (err) {
bot.reply(message,'Error loading user:' + err);
} else {
bot.reply(message,'You are ' + user.name + ' and your email is ' + user.email + ' and your user id is ' + user.id);
}
});
});
But, I get the following error:
error TS2339: Property 'api' does not exist on type 'BotWorker'.
Maybe the docs are outdated? I also tried using the TeamsBotWorker.teams
for getMember()
. But, I couldn't get it working either.
- Botkit version: 4.10.0
- Messaging Platform: MS Teams
- Node version: v16.13.2
- OS: Linux
Metadata
Metadata
Assignees
Labels
No labels