Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there a way to get the bot id/profile from memory datastore? #306

Closed
3 tasks done
denouche opened this issue Dec 28, 2016 · 1 comment
Closed
3 tasks done

Is there a way to get the bot id/profile from memory datastore? #306

denouche opened this issue Dec 28, 2016 · 1 comment
Labels
question M-T: User needs support to use the project

Comments

@denouche
Copy link

denouche commented Dec 28, 2016

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.

Description

Is there a way to get the bot id/profile from memory datastore?
For now I can store it by myself in the "CLIENT_EVENTS.RTM.AUTHENTICATED" event, but as the memory datastore store all the needed informations, maybe the current bot profile could be stored also in the datastore?

The use case is the following:

I want to be able to know if someone is talking to the bot on a channel.
So when the bot receive for example this:
coucou <@U00123456> ça va ?
I need to be able to compare the given U00123456 with the bot id.

By the way maybe there is another way to achieve that?

Thank you in advance

@aoberoi aoberoi added the question M-T: User needs support to use the project label Oct 3, 2017
@aoberoi
Copy link
Contributor

aoberoi commented Oct 3, 2017

you should be able to read the bot user ID from the RtmClient instance itself: rtm.activeUserId.

you can find details about the your bot user's profile in the data store using rtm.dataStore.getUserById(rtm.activeUserId).

@aoberoi aoberoi closed this as completed Oct 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question M-T: User needs support to use the project
Projects
None yet
Development

No branches or pull requests

2 participants