Skip to content
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

Changing the prefix #5

Open
DamonOnYT opened this issue Apr 3, 2018 · 2 comments
Open

Changing the prefix #5

DamonOnYT opened this issue Apr 3, 2018 · 2 comments

Comments

@DamonOnYT
Copy link

I have tried everything in changing the code,and when i try and change it nothing will happen if i try a command, i would like to change it to u! If you can help that would be great!

@brendacs
Copy link
Owner

brendacs commented Apr 3, 2018

If you want to modify the prefix directly in the code, you'd have to do so in the msgParser.js file in the src folder.

Check line 9 where it should have the following:

if (msg.toString().substring(0, 1) === '>') { // if prefix is used

Change > to whatever prefix you want to use.

Since your particular prefix is 2 characters long and not 1 character long, check line 10 which should say the following:

const args = msg.toString().substring(1).split(' ');

Change substring(1) to substring(2). The number should always be the length of your prefix.

After doing this, you will need to build again using npm run build. Try running the bot again after this and seeing if it works!

@brendacs brendacs changed the title Changing The Prefix Changing the prefix Apr 3, 2018
@brendacs
Copy link
Owner

brendacs commented Apr 3, 2018

I might work on making this setting more accessible by adding a command to the running bot so users don't have to modify it directly in the code. I will keep this issue open.

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

No branches or pull requests

2 participants