Forum Discussion
Is there any event for bot that I can use every time it is added?
Here is something I found on Internet.
--------------------------
clearab commented on Jan 17, 2020 •
A couple of things to add here:
The conversationUpdate event is sent in slightly different instances depending on context:
For a 1:1 conversation between the bot and a user (personal scope) the event is only sent the very first time the bot is installed. Technically, it is sent when the conversation is created between the bot and the user. If the user uninstalls the bot, this conversation is not deleted, so if the user then re-installs the bot the event is not sent.
For Group Chats and Channels the event will be sent each time the bot is installed. This is because each time the bot is uninstalled from this context, it is actually completely removed from the conversation, so an uninstall triggers the event.
An important distinction - the event is sent on a "best effort" basis. It is not 100% guaranteed to be sent, and is definitely not 100% guaranteed to be received. Outages and transient issues can affect the send (but they should be exceedingly rare).
---------------
So If I understood correctly, it sounds like this guy is saying that if the bot was installed under Team Channel, that conversationUpdate event is triggered.
Well..here is my manifest of my bot.
"bots": [
{
"botId": ...,
"scopes": [
"team",
"personal"
]
}
],
So my bot should support team and personal scope..so I tried to install my bot under team channel...and ..then reinstalled..however, conversationUpdate wasn't triggered. Somehow my understanding wasn't correct??
Only thing I am able to see is that the conversationUpdate event is triggered ONLY the bot is fully registered again with new guid....
- Mamatha-MSFTMay 14, 2021Former Employee
Hi firstteam, The
teamMemberAddedevent is sent to your bot if the bot is added to a conversation first time . If you want to reinstall the app first uninstall the existing app from team then again install the app into a team then you will getteamMemberAdded event.- firstteamMay 17, 2021Copper ContributorJust FYI,..never mind...that event just started triggering again...I have no idea. Nothing changed. Not sure what made this work again...Who knows at some point it wouldn't trigger??..Anyway..just FYI.
- Mamatha-MSFTMay 17, 2021Former Employee
Hi firstteam, Because of the cache issue it may not trigger the event some times. And make sure to uninstall all the previously installed apps with that Bot Id or App ID.
- firstteamMay 17, 2021Copper ContributorThanks. This really makes me crazy. Yes..once I re-installed then, ..then I see this event was triggered..However, at some point, for some reasons, I have no idea...this event wasn't triggered.... it is like random behavior...it is really killing me.
- firstteamMay 15, 2021Copper Contributor
BTW..Wow..Amazing...one that I've created bots(there are several due to testing)...I CANNOT find any interface that I could remove them... I went to admin page as well.....I don't see anything that I could remove the existing bots that I've created for testing..WOW...Is there any way I could remove possibly remove the bots I've created??
- Mamatha-MSFTMay 16, 2021Former Employee