Skip to content

fix case sensitivity of the messageCreate command if unprefixed is true - #405

Closed
Daaisukidayo wants to merge 17 commits into
tryforge:devfrom
Daaisukidayo:patch
Closed

fix case sensitivity of the messageCreate command if unprefixed is true#405
Daaisukidayo wants to merge 17 commits into
tryforge:devfrom
Daaisukidayo:patch

Conversation

@Daaisukidayo

@Daaisukidayo Daaisukidayo commented Aug 18, 2026

Copy link
Copy Markdown
  • Fixed the case where the messageCreate command was case sensitive if unprefixed was set to true
  • Added MessageContent to the intents array
  • Updated event version

@xNickyDev xNickyDev added not tested Bug has not been reproduced invalid This doesn't seem right blocked patch labels Aug 19, 2026
@Daaisukidayo

Daaisukidayo commented Aug 19, 2026

Copy link
Copy Markdown
Author

All tests performed manually in Discord using the eval command. Prefix was either ! or omitted, depending on the case being tested.

Command name casing (original bug)

  • Eval test (capitalized, no prefix, unprefixed: true) - eval triggers correctly
  • eval test - still triggers as expected

Prefix handling

  • !eval test (matching case) - works
  • Message with no prefix, while prefixed (unprefixed: false or omitted) commands exist - command does not trigger
  • !e test - eval command resolves correctly via its alias e

unprefixed semantics

  • eval with unprefixed: true works without a prefix
  • Same command also works with the ! prefix

Argument (args) handling

  • !eval testeval receives args = ["test"] (command name correctly stripped)
  • A nameless (always executable) handler matching the same message receives the full, unstripped ["eval", "test"] instead of a truncated array - confirms args are sliced independently per command rather than mutated on a shared array
  • !eval with multiple consecutive spaces between tokens - whitespace collapses correctly, no empty tokens in args

Comment thread src/handlers/events/messageCreate.ts Outdated
@xNickyDev xNickyDev self-assigned this Aug 20, 2026
@Daaisukidayo

Copy link
Copy Markdown
Author

So, what's next?

@Daaisukidayo
Daaisukidayo requested a review from xNickyDev August 23, 2026 11:29
@xNickyDev xNickyDev removed the invalid This doesn't seem right label Aug 23, 2026
@xNickyDev

xNickyDev commented Aug 31, 2026

Copy link
Copy Markdown
Member

I haven't verified those changes yet, whilst waiting please resolve all current conflicts to stay in sync with the latest commit on the dev branch.

@xNickyDev xNickyDev added the invalid This doesn't seem right label Sep 1, 2026
@xNickyDev

Copy link
Copy Markdown
Member

This pull request appears to be corrupted now and some of your changes seem to have gone lost. To prevent a messy pull request and potential data corruption after merging, I suggest creating a new pull request for your changes on a different branch. Sorry for the inconvenience! 🙏

@xNickyDev xNickyDev closed this Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked invalid This doesn't seem right not tested Bug has not been reproduced patch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants