-
Notifications
You must be signed in to change notification settings - Fork 2.3k
MS Teams: Property 'api' does not exist on type 'BotWorker' #2201
Comments
When I use bot.teams.getTeamDetails(bot.getConfig('context')); I get the following error:
|
@benbrown can you help here? |
@MoosaSaadat I'm doing getMember to get user e-mail on 4.10.0
|
@billyzoellers Although it works fine, I am using TypeScript and get the following error:
I have to disable type check in order to compile it
|
Btw @benbrown when this issue is resolved, I can create a PR to update docs for using |
Hi guys. For historical accuracy - the doc you linked to in your OP is to the previous version of Botkit, not the current 4.0 version. Accessing the |
@benbrown as per the specification of static:
The error we are facing is also demonstrated in the first example: class Triple {
...
static calculate(n = 1) {
return n * 3;
}
}
...
const tp = new Triple();
...
// This throws because calculate() is a static member, not an instance member.
console.log(tp.calculate()); // 'tp.calculate is not a function' So, in our case, access to the |
Can you import it directly from the https://github.com/howdyai/botkit/blob/main/packages/botkit/src/core.ts#L374 |
Yes, I can import it directly and it works fine like that. But, I guess it is not a standard practice to import dependencies which are not mentioned in
Is there a way to list it in dependencies without having to download multiple versions of it? Will have to make sure that the listed dependency has the same version as botkit dependency to avoid unnecessary duplication. |
@MoosaSaadat Correct, you should use the same version of botbuilder as Botkit to avoid conflicts. |
I need to get the user email. I am trying to run the following feature from the docs:
But, I get the following error:
Maybe the docs are outdated? I also tried using the
TeamsBotWorker.teams
forgetMember()
. But, I couldn't get it working either.The text was updated successfully, but these errors were encountered: