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

framework->config->allow_whitespace(true) consistenly produces inappropriate behaviour #206

Closed
thinkier opened this issue Oct 29, 2017 · 1 comment
Labels
bug Something misbehaves or is not working. good first issue An easy problem suited for people new to Rust or Serenity. opinions wanted Discussion or solution to a problem requested.

Comments

@thinkier
Copy link

thinkier commented Oct 29, 2017

The bug happens because of incorrect prefix detection, just when whitespaces are enabled.

client.with_framework(StandardFramework::new()
	.configure(|c| c
		.allow_whitespace(true)
	)
	// ...

In the following reproduction table the following should be assumed.

  • The prefix is $c
  • There are 2 commands.
    • One has the name p and the other has the name h
Command Sent By User Command Triggered Is it correct
$cp p
$ch h
$chp p
$chh h ❌🤔
$cah h
$cap p
$ca h h
$caah None
$c ah None

Side bug: also found that config.allow_whitespace(false) may not be respected.


Edits:

  • Pressed Ctrl+Enter accidentally.
  • Found another bug relating to the same code.
@ghost ghost added bug Something misbehaves or is not working. good first issue An easy problem suited for people new to Rust or Serenity. opinions wanted Discussion or solution to a problem requested. label-hacktoberfest labels Oct 29, 2017
@thinkier thinkier mentioned this issue Oct 29, 2017
arqunis pushed a commit that referenced this issue Oct 29, 2017
@thinkier
Copy link
Author

This is fixed and merged, can close now...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something misbehaves or is not working. good first issue An easy problem suited for people new to Rust or Serenity. opinions wanted Discussion or solution to a problem requested.
Projects
None yet
Development

No branches or pull requests

1 participant