-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat: Prefix Command Management #85
feat: Prefix Command Management #85
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really good work! I like the way this has been done.
src/commands/moderation/prefixCommands/functions/addChannelPermission.ts
Outdated
Show resolved
Hide resolved
src/commands/moderation/prefixCommands/functions/modifyCommand.ts
Outdated
Show resolved
Hide resolved
src/commands/moderation/prefixCommands/functions/modifyVersion.ts
Outdated
Show resolved
Hide resolved
Some further comments as discussed:
|
Moderator in |
Addressed the review comments, will look at
Also likely to hide the choice buttons if it is a "fallback-to-GENERIC" if a different unavailable version is requested (either explicit, or by channel default) |
Can this be done? I don't see a way to add a description to the Modal? Doesn't look like we do it anywhere? |
You're right! I saw descriptions somewhere but seems it was only a concept. I guess we will just have to remember that we have a two minute limit. Make sure that people who can add and modify commands write their commands out elsewhere and just copy/paste in. |
I just gave this a test and thought I'd share what I found. I have not reviewed the code yet because I wanted to understand the functionality first. All was tested on e95eae2. To get the important stuff right out of the way:
The rest are just thoughts I had while messing about. When a custom version is set as a channel default and that version is disabled, nothing is shown.Example setup with
|
Another bug I just found: Aliases are not unique against command names and aliases of other commands. Example: These can all exist at the same time. Command 1
Command 2
Command 3
This results in undefined behavior as there are three possible commands that would all fulfil the conditions to be shown. |
Bunch of changes, most are bug fixes and minor enhancements to make sure that there's no overlap in commands, aliases & versions. Also no empty contents. Feedback on commands without content: Can't really do anything about it. I can't force setting a GENERIC content, unless we do it during the creation of the command, but would require a bit more work than we have time for right now. Feeback on different slash commands: As discussed in the channel, Discord has a max length on command definition and subgroup/commands, we would be exceeding it if we put it in one. Changes since my last comment (4 days ago) pdellaert/fbw-discord-bot-utils@e95eae2...dynamic-command-management |
That sounds awesome! Regarding the commands without content, I think that something we can introduce down the line if we want to. Definitely not a showstopper. |
Agree on this. There will be a limited amount of people who can add commands so the likelihood of us having rogue empty commands should be none. |
* AutoComplete added for categories, versions and command names where appropriate * Added Modal for Content
…l message create handler
…selection for GENERIC versions
Co-authored-by: ExampleWasTaken <58574351+ExampleWasTaken@users.noreply.github.com>
Co-authored-by: ExampleWasTaken <58574351+ExampleWasTaken@users.noreply.github.com>
Co-authored-by: ExampleWasTaken <58574351+ExampleWasTaken@users.noreply.github.com>
Co-authored-by: ExampleWasTaken <58574351+ExampleWasTaken@users.noreply.github.com>
Co-authored-by: ExampleWasTaken <58574351+ExampleWasTaken@users.noreply.github.com>
Co-authored-by: ExampleWasTaken <58574351+ExampleWasTaken@users.noreply.github.com>
Co-authored-by: ExampleWasTaken <58574351+ExampleWasTaken@users.noreply.github.com>
Co-authored-by: ExampleWasTaken <58574351+ExampleWasTaken@users.noreply.github.com>
Co-authored-by: ExampleWasTaken <58574351+ExampleWasTaken@users.noreply.github.com>
Co-authored-by: ExampleWasTaken <58574351+ExampleWasTaken@users.noreply.github.com>
Co-authored-by: ExampleWasTaken <58574351+ExampleWasTaken@users.noreply.github.com>
Co-authored-by: ExampleWasTaken <58574351+ExampleWasTaken@users.noreply.github.com>
Co-authored-by: ExampleWasTaken <58574351+ExampleWasTaken@users.noreply.github.com>
Co-authored-by: ExampleWasTaken <58574351+ExampleWasTaken@users.noreply.github.com>
Prefix Command Management
Description
Please read https://github.com/pdellaert/fbw-discord-bot-utils/blob/dynamic-command-management/docs/prefix-commands.md for all the fancy details.
NOTE: The cache refresh system will be rewritten to be safer, right now it isn't perfectly safe.
Test Results
I don't know how many hours, but probably good someone takes their own look...
Discord Username
straks