I'm trying to use the doc demonstration to log a menu, but upon using the following code:
const dominos = require("dominos");
var theStore = new dominos.Store();
theStore.ID = 7056;
theStore.getMenu(
function(menuData) {
console.log(menuData)
}
)
I get a TypeError, which is printed in the title of this issue. This is the error stack:
TypeError: Cannot read property 'ID' of undefined
at new Store (/home/ubuntu/workspace/node_modules/dominos/src/Store.js:10:25)
at eval (eval at <anonymous> (/home/ubuntu/workspace/dominos.js:84:146), <anonymous>:1:17)
at Client.mybot.on.e (/home/ubuntu/workspace/dominos.js:84:141)
at emitOne (events.js:96:13)
at Client.emit (events.js:188:7)
at MessageCreateHandler.handle (/home/ubuntu/workspace/node_modules/discord.js/src/client/websocket/packets/handlers/MessageCreate.js:9:34)
at WebSocketPacketManager.handle (/home/ubuntu/workspace/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:104:65)
at WebSocketManager.eventMessage (/home/ubuntu/workspace/node_modules/discord.js/src/client/websocket/WebSocketManager.js:225:31)
at WebSocket.ws.onmessage (/home/ubuntu/workspace/node_modules/discord.js/src/client/websocket/WebSocketManager.js:83:37)
at WebSocket.onMessage (/home/ubuntu/workspace/node_modules/ws/lib/WebSocket.js:442:14)
(If some of that looks unfamiliar, I'm using another package in conjunction with this.)
I'm trying to use the doc demonstration to log a menu, but upon using the following code:
I get a TypeError, which is printed in the title of this issue. This is the error stack:
(If some of that looks unfamiliar, I'm using another package in conjunction with this.)