Closed NanderTGA closed 1 year ago
One possible issue with this though:
Some code (e.g. built-in help command) uses the first value in the array of commandPrefixes to get the "main" prefix.
I have noticed the order does not get changed by Set
though.
I could replace this.commandPrefixes[0]
with this.commandPrefixes.keys().next()
, but this just makes it too long.
I'll go with a new property this.mainCommandPrefix
.
I'm also thinking about renaming this.commandPrefixes
to this.prefixes
(name for the new property has not been decided yet)
Not sure about this though. What is better? commandPrefixes
or prefixes
?
I prefer prefixes
, it's shorter, and it should be pretty obvious what it's used for.
I'm also taking the opportunity here to provide the ability disable the command system completely. If you want to disable the command system, set the main prefix to an empty string.
:tada: This issue has been resolved in version 2.0.0 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
Thank you, msgroom-js-semantic-release, this is really helpful to know
I'm sorry if that message was annoying, I didn't know it would comment on every issue and PR closed in the last eight months. It does explain why it took around ten minutes to run though. But I still think it can be pretty useful in the future.
It's fine - it was just a bit surprising. (Also, merging 2.0 while msgroom is down is kind of funny :P)
A Set makes more sense here. No duplicates + easier to remove specific prefixes.