#Arc Prefix Commands
1 messages · Page 1 of 1 (latest)
No
no command handler is maintained that supports prefix commands
your only option is to either
A) use an old version of lightbulb (not recommended)
or
B) Roll your own prefix command handler
Thank you so much! I think for now I'll just use slash commands, and manually handle the few prefix commands to begin with, then over time if my needs change I can roll my own prefix command handler! Thanks again :)
Curious to know what uses you have for prefix commands that slash commands can't/don't cover?
For some actions, it is handy to do the following, for example I am making a profile system where people can basically describe themselves and give themselves tags, and if a moderator needs to set someones name set it their profile, it is easier to reply to a message the user send and do ?profilename <new-name> rather than /profile setname <new-name> <member>. And that also reduces the possibility of changing the wrong users name. Or just for quick commands like cooldowns. to do ?cd 10s is easier than doing /cooldown 10s. Especially if those commands have the new time as optional as I have to select to add the time value. Whereas with a prefix command it is just, ?cd 10s or ?cd
Hope that helps :)
what about user commands
user command + modal would do exactly as you described.
only downside being you'd have to show them the new way
it is easier to do
?profilename <new-name>rather than/profile setname <new-name> <member>
other than one extra arg (which really is not all that extra effort), i'm not seeing how that's easier? on one hand it's an extra arg - on the other, you're literally writing far more code to correctly handle prefixes and then also have to ensure that you handle terminating args with no pre-interaction validation
i'd also say that making the command only work when it's being used while a specific message sent by a specific user is being replied to is... wonky
because you then have to handle
- what if the user doesn't reply to a message
- what if the user replies to the wrong message
having that explicit<member>arg is yet more validation that the action being performed is the correct one
Oooh, thats an idea, the only problem is there is lots of different commands. So Profile Name, Profile Age, Profile Location. And so I would probably need to make a Manage Profile with a select menu for the option and then submit the modal then it shows another letting you to set the option to what you choose. And as much as it is annoying to handle the prefix commands, it does give fast actions. And the command would work with ?profilename <new-name> if you replied to a message but you would still be able to do ?profilename <member> <new-name> so you can specify a member tag.
of course, it's your bot, we're happy to help you make it however you want it - but we give everyone the same spiel about prefix commands here lol :P
you can now have up to 15 user and/or message commands, ontop of each modal having 5 components
as much as it is annoying to handle the prefix commands, it does give fast actions
you're really going to hate me after this with how much i'm going to critique every aspect of prefix commands but
from past experience i found it much slower to have to bring up the help menu, remember what the command is, and then do the command - than it is to have the slash command menu show up and show me every command when i do/
Yeah thats why I like the hybrid approach of both, because all commands are slash commands, and also prefix commands. Which gives users the option of both, which allows advanced users to do ?profilename <new-name> with extra features or just do /profile setname <new-name>
No offence but I agree with ben? (hope its okay to shrink your name to that).
Slash commands are the wrong fit here. Its not that it doesn't work, but it is extra work, and people are lazy. if the command is as simple as replying to someone with ?nick beans and it sets there nickname, then I think thats reasonably fine, but tbh this is exactly where user commands shine, and its quite literally there purpose to do exactly things as described here
a user command would be ideal, but i think it's the specific action of having to hit "Reply" on a message before doing ?nick - there have definitely been times in an active chat where a message has popped up right as i went to hit a button on a message and hit that button on the wrong message
Yeah its fine to shorten my name to that(my name is Ben haha). Yeah I know, stuff like this could also be user commands, but I want to develop a bot that gives users the choice between what to do.
the <member> arg on a slash command makes it explicit - "i want to target this user specifically"
also i'm very biased towards slash commands because i love the aspect of ephemerality - i used to hate the way prefix commands were just unnecessary clutter in a live chat
A modal and Apps but that relies on Right Click -> Apps -> Manage Profile then selecting Set Name then submit then Entering a name. Which is great for someone who doesn't know the commands, but for a admin needing to quickly set an inappropriate name its quicker to do ?profilename <new>
i guess it's 6 and two 3s
are you saying this in terms of comparing to prefix commands or user commands
just all interaction-based commands vs prefix commands
Same, that is the one reason I started using slash commands haha. I think its amazing to be able to not need a separate commands channel. And to be able to do moderation actions without users every knowing.
precisely that last point
ngl, for a reasonably simple command its not the worst thing to do it that way. I mean, prefix commands are nice to also hide specific commands from specific users which can be useful (but I do not believe your doing that here)
It gets significantly worse imo when commands have multiple arguments. If you have multiple arguments, or need strict validation just use slash commands.
Yeah to have like an undocumented command that only admins can use, that doesn't send an invalid permission message. There are pros and cons to both, and I think both prefix commands and slash commands have their places.
Yeah trying to validate prefix commands, it becomes very easy to not check for one condition and break the whole command.
i'm like 90% sure if you remove permissions on a slash command in the integrations tab in server settings it removes it from view if a user can't execute it
i might be wrong though
this is correct but its hard to target specific people
Yeah it does, but even then that only allows me to edit the view based on roles and users. If i want to make a command only sometimes show, I can't.
plus, its server controlled, which means as a developer you can't force hidden commands if needed
And it only allows you to do it for the root command, so if you have /ticket open /ticket manage. I can't get /ticket manage to show just for mods and /ticket open for everyone.
Yeah that is another annoying thing, I can only set the default based on permissions, not roles. Unless you create an oauth flow and get the user to agree to give the bot permissions to manage integrations and use a different endpoint.
yup
one command I see quite often is !sync for syncing global commands (thankfully doesn't need to exist on any command handlers in hikari because they are built by devs that have more than 2 brain cells) but thats a good example. You can't have it as a slash command, because well... it could get outdated, slash commands may have never been synced, etc, whereas a prefix command, that simply checks if the message has the prefix checks if the user is the application owner, and the word sync it syncs the slash commands. Its a pretty basic concept but its an example of a command that literally cannot be a slash command
Yeah, lol thankfully, I would probably be the one to release an update to slash commands and forget to !sync hahahaha