Skip to content

Monday build gl #7

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

GLSea1979
Copy link

Not really working, I can't figure out why..

// const message = data.toString().split(' ');
// console.log(message);
if (command.startsWith('@')) {
ee.emit(command, client, data.toString().split().slice(1).join(' '));
Copy link

@jonathanheemstra jonathanheemstra Feb 21, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GLSea1979 the reason your code is currently not functioning is you are missing a separator argument in your .split method. So when your conditional runs it doesn't know where to split the data it gets back after the .toString() is run.

if you update your code to be .split(' ') where the separator is a space then your code will work.

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

Successfully merging this pull request may close these issues.

2 participants