question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BotConnector to reset a session

See original GitHub issue

Is there a way I can make BotConnector to forger a user it is connecting with. Meaning, reset it’s session.

For example, I would like to use /stop command to completely forget a user, but next time user initiate a chat, the bot will act as this is a first interaction.

I know I could have a flag as session.firstRun as in the examples, but I wonder if there is a cleaner way.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:31 (18 by maintainers)

github_iconTop GitHub Comments

8reactions
msft-shahinscommented, Apr 15, 2016

@wiltodelta skype and slack eating / command as their commands. you can put a space in front of command /deleteprofile in slack and skype to make sure that it is delivered to connector.

@mikkhait session.reset() in node code should reset the callstack and begin a new dialog based on passed in dialogId with the user.

4reactions
msft-shahinscommented, Apr 12, 2016

BotConnector supports a native /deleteprofile command. if a user sends this command to the bot, the connector will confirm the delete action with the user and sends a message with the type of DeleteUserData to the bot. The bot should delete all the data related to that user in its storage space and send a reply with the same message type to BotConnector. As a result, next time that the user talks to the bot, he/she will look like a new user.

Read more comments on GitHub >

github_iconTop Results From Across the Web

BotConnector to reset a session · Issue #101 - GitHub
BotConnector supports a native /deleteprofile command. if a user sends this command to the bot, the connector will confirm the delete action ...
Read more >
Reset Session in Microsoft BotFramework with NodeJS
I want to add a button at the header which will be a reset button, which will restart the session and remove all...
Read more >
Session class | Microsoft Learn
Manages the bots conversation with a user. ... The connector being used for this session. conversationData ... Returns true if the session has...
Read more >
DeleteSession - Amazon Lex API Reference
Removes session information for a specified bot, alias, and user ID. You can use this operation to restart a conversation with a bot....
Read more >
Clear chatbot user session (BotUserSession) from web ...
You can also achieve this scenario by sending a message to the bot through BotKit when the chat window is closed and then...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found