JBader89 / PlugBot

A Plug.dj bot for the popular music sharing site Plug.dj
6 stars 5 forks source link

.Calc Command Bug #5

Closed ghost closed 10 years ago

ghost commented 10 years ago

When using the .calc command, by doing 4 X 2, the bot crashes from Plug.DJ and stops working.

Error Message: /var/lib/stickshift/52bdc9f44382ecfb8d000026/app-root/data/704711/node_modules/math-lexer/index.js:211 throw new _lexer.ParseError(); at Object._parseString._statefuncs.Error (/var/lib/stickshift/52bdc9f44382ecfb8d000026/app-root/data/704711/node_modules/math-lexer/index.js:211:27) at _parseString (/var/lib/stickshift/52bdc9f44382ecfb8d000026/app-root/data/704711/node_modules/math-lexer/index.js:365:36) at Object._parseString._statefuncs.AddOp (/var/lib/stickshift/52bdc9f44382ecfb8d000026/app-root/data/704711/node_modules/math-lexer/index.js:261:46) at _parseString (/var/lib/stickshift/52bdc9f44382ecfb8d000026/app-root/data/704711/node_modules/math-lexer/index.js:365:36) at Object._parseString._statefuncs.AddOp (/var/lib/stickshift/52bdc9f44382ecfb8d000026/app-root/data/704711/node_modules/math-lexer/index.js:261:46) at _parseString (/var/lib/stickshift/52bdc9f44382ecfb8d000026/app-root/data/704711/node_modules/math-lexer/index.js:365:36) at Object.module.exports.parseString (/var/lib/stickshift/52bdc9f44382ecfb8d000026/app-root/data/704711/node_modules/math-lexer/index.js:392:22) at PlugAPI. (/var/lib/stickshift/52bdc9f44382ecfb8d000026/app-root/data/704711/Plug.DJ at PlugAPI.EventEmitter.emit (events.js:95:17) at WebSocket. (/var/lib/stickshift/52bdc9f44382ecfb8d000026/app-root/data/704711/Plug.DJ at WebSocket.EventEmitter.emit (events.js:98:17) at Receiver.self._receiver.ontext (/var/lib/stickshift/52bdc9f44382ecfb8d000026/app-root/data/704711/node_modules/ws/lib/WebSocket.js:697:10) at Receiver.opcodes.1.finish (/var/lib/stickshift/52bdc9f44382ecfb8d000026/app-root/data/704711/node_modules/ws/lib/Receiver.js:397:14) at Receiver.expectHandler (/var/lib/stickshift/52bdc9f44382ecfb8d000026/app-root/data/704711/node_modules/ws/lib/Receiver.js:384:31)
at Receiver.add (/var/lib/stickshift/52bdc9f44382ecfb8d000026/app-root/data/704711/node_modules/ws/lib/Receiver.js:93:24) at CleartextStream.firstHandler (/var/lib/stickshift/52bdc9f44382ecfb8d000026/app-root/data/704711/node_modules/ws/lib/WebSocket.js:678:22) at CleartextStream.EventEmitter.emit (events.js:95:17) at CleartextStream. (_streamreadable.js:746:14) at CleartextStream.EventEmitter.emit (events.js:92:17) at emitReadable (_stream_readable.js:408:10) at _stream_readable.js:401:7 at process._tickCallback (node.js:415:13)

JBader89 commented 10 years ago

Thanks for bringing this to my attention - I noticed this bug earlier but forgot about it. Both .calc 4 x 2 and .calc 4 * 2 should now work in the same way.