Skip to content

Conversation

@arthurmelton
Copy link
Collaborator

@arthurmelton arthurmelton commented May 11, 2023

This adds the ability for slash commands to be used. This also leaves the possibility of using commands the old fashion way just by typing the commands. This implementation trys to make it the easiest to switch commands to work with the new system so they way commands are coded will be the same. This will also make it easy to switch commands in other pull requests (like #11 and #16 ). If you want to do some testing switch the line src/main/kotlin/de/bigboot/ggtools/fang/Command.kt#164 to

.createGuildApplicationCommand(applicationId, 1234512345L, command.build())

The number is the guild you want to do testing in, this is because when using global commands discord can take up to a hour to fully populate everything.

Here is also an example of what using the normal command is like compared to the slash command.

2023-05-10_21-26

Here is what it would look like for the user when trying to pick what command they want to use.

2023-05-10_21-28

Everything is in the same order as in !commands. Don't worry about the top item being /list, this was just from testing as I don't know how to delete the commands. All the commands will have a description and the arguments required. The reason that only one command shows actual arguments is because that is the one I am hovered over but they will all show that.

Everything should also work the same as in the normal commands, mainly the permissions and the error messages.

@arthurmelton
Copy link
Collaborator Author

Let me do more testing tonight, I think this might actually do some things wrong. I also found out how to delete all of the slash commands for testing.

@arthurmelton
Copy link
Collaborator Author

I did some testing and this should be ready to get.

@arthurmelton
Copy link
Collaborator Author

Wait, I actually did find a bug with it. I will try and fix it by tonight.

@arthurmelton
Copy link
Collaborator Author

Ok, looking at the discord documentation there is no possibility to have a command that is higher than 3 deep.

We could have commands like this

  • /help
  • /server admin_pw
  • /admin server add

We could not do the following

  • admin group permission add
  • admin group users add

I will close this pull request as I don't think it is possible to get around this constraint.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant