Skip to content

Bot doesn't accept commands #54

@JordanRushing

Description

@JordanRushing

Example:

From Discord:
$ !weather Seattle

Console output:

ubuntu at ip-172-31-16-223 in ~/discordbot (master●)
$ npm start

> coolpal@0.0.0 start /home/ubuntu/discordbot
> node bin/prod_bundle.min.js

Just saying im ready
/home/ubuntu/discordbot/src/plugins/spam/plugin.js:14
    if (command_args[0] != config.prefix + 'spam') {
                                  ^

TypeError: Cannot read property 'prefix' of undefined
    at SpamPlugin.handle_message (/home/ubuntu/discordbot/src/plugins/spam/plugin.js:14:35)
    at SpamPlugin.handle_event (/home/ubuntu/discordbot/src/plugins/plugin.js:45:19)
    at Client.client.on.event (/home/ubuntu/discordbot/src/coolpal.js:181:36)
    at emitOne (events.js:116:13)
    at Client.emit (events.js:211:7)
    at MessageCreateHandler.handle (/home/ubuntu/discordbot/node_modules/discord.js/src/client/websocket/packets/handlers/MessageCreate.js:9:34)
    at WebSocketPacketManager.handle (/home/ubuntu/discordbot/node_modules/discord.js/src/client/websocket/packets/WebSocketPacketManager.js:103:65)
    at WebSocketConnection.onPacket (/home/ubuntu/discordbot/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:330:35)
    at WebSocketConnection.onMessage (/home/ubuntu/discordbot/node_modules/discord.js/src/client/websocket/WebSocketConnection.js:293:17)
    at WebSocket.onMessage (/home/ubuntu/discordbot/node_modules/ws/lib/event-target.js:120:16)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! coolpal@0.0.0 start: `node bin/prod_bundle.min.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the coolpal@0.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/ubuntu/.npm/_logs/2018-05-13T11_07_30_595Z-debug.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions