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

@DaaisukidayoDaaisukidayo commented Aug 18, 2026

Copy link
Copy Markdown
Contributor
  • 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

@xNickyDevxNickyDev 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
ContributorAuthor

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 threadsrc/handlers/events/messageCreate.ts Outdated
@xNickyDevxNickyDev self-assigned this Aug 20, 2026
@Daaisukidayo

Copy link
Copy Markdown
ContributorAuthor

So, what's next?

@xNickyDevxNickyDev 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.

@xNickyDevxNickyDev 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! 🙏

@Daaisukidayo
Daaisukidayo deleted the patch branch September 1, 2026 11:34
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blockedinvalidThis doesn't seem rightnot testedBug has not been reproducedpatch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@Daaisukidayo@xNickyDev