Skip to content
This repository has been archived by the owner on Jan 19, 2020. It is now read-only.

[Question] TypeError: session.getUserContext is not a function #84

Open
mkneib opened this issue May 17, 2017 · 1 comment
Open

[Question] TypeError: session.getUserContext is not a function #84

mkneib opened this issue May 17, 2017 · 1 comment

Comments

@mkneib
Copy link

mkneib commented May 17, 2017

Hi,

i,ve tried to add functionality as described as first steps here.

https://bottr.co/docs/adding-functionality.html

This ends in an error, when typing "/stats"

/Users/user/botName/index.js:10
 var context = session.getUserContext({
                       ^

TypeError: session.getUserContext is not a function
    at Event.<anonymous> (/Users/user/botName/index.js:10:24)
    at Event.next (/Users/user/botName/node_modules/bottr/lib/event.js:16:14)
    at Event.triggerNext (/Users/user/botName/node_modules/bottr/lib/event.js:10:12)
    at Event.<anonymous> (/Users/user/botName/node_modules/bottr/lib/bot.js:22:5)
    at Event.next (/Users/user/botName/node_modules/bottr/lib/event.js:16:14)
    at EventEmitter.emit (/Users/user/botName/node_modules/bottr/lib/event-emitter.js:28:9)
    at Bot.trigger (/Users/user/botName/node_modules/bottr/lib/bot.js:49:26)
    at WebsocketClient.<anonymous> (/Users/user/botName/node_modules/bottr/lib/websocket-client.js:24:14)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at /Users/user/botName/node_modules/socket.io/lib/socket.js:503:12
    at _combinedTickCallback (internal/process/next_tick.js:73:7)
    at process._tickCallback (internal/process/next_tick.js:104:9)`

The function getUserContext is not declared in the file

/Users/user/botName/node_modules/bottr/lib/session.js
.```

What did i miss? I am new to nodejs.
@sebastiangrebe
Copy link

When I see this correctly the current npm package which is installed via bottr init is not the same version as in the master branch

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants