Skip to content

Command-system pr - #37

Merged
marko-radosavljevic merged 3 commits into
developfrom
feature/command-system
Sep 12, 2021
Merged

marko-radosavljevic merged 3 commits into
developfrom
feature/command-system

Conversation

@Tais993

@Tais993 Tais993 commented Sep 8, 2021 •

Copy link
Copy Markdown
Member

This will be the main PR for the command-system.
See the relating issue #10 for more information.

There's still a few things we have to do, therefor:

  • Add handling for buttons and selection menus in the CommandHandler class
  • Util for generating component ID's of commands
  • Util for converting component ID's of commands to a list - will be pushed when internet is available
  • Add command which updates slash-commands
  • Command handler

more in the future..

@Tais993 Tais993 self-assigned this Sep 8, 2021
@Tais993 Tais993 added the enhancement New feature or request label Sep 8, 2021
@Zabuzard Zabuzard mentioned this pull request Sep 8, 2021
@Tais993

Tais993 commented Sep 8, 2021

Copy link
Copy Markdown
Member Author

While I originally wanted to add functionality so it's easier to work with slash-command permissions.
I myself will wait for the rework of the slash-command permissions.

Current way slash-command permissions work is shit, and Discord has confirmed on reworking them.
See this discussion, the moderation section
"Revisit the permissions system to make it more flexible"

So anyone is free to create it, but most likely you will have to revamp it when the reworked permission system comes.

@Zabuzard Zabuzard added this to the Initial Setup milestone Sep 9, 2021
Tais993 added a commit that referenced this pull request Sep 9, 2021
@Tais993
Tais993 marked this pull request as ready for review September 10, 2021 12:51
@Tais993
Tais993 changed the base branch from master to develop September 10, 2021 12:53

@illuminator3 illuminator3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please apply our formatting by running gradle spotlessApply :)

@illuminator3 illuminator3 linked an issue Sep 10, 2021 that may be closed by this pull request

@d3vel0per d3vel0per left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from the added review comments. I think extracting out some of very large lambdas into well named functions will aid in readability as well as testability.

illuminator3
illuminator3 previously approved these changes Sep 11, 2021
@Tais993

Tais993 commented Sep 11, 2021

Copy link
Copy Markdown
Member Author

I'll accept after 2 reviews, not the required 2 since I find this really important.

@Tais993

Tais993 commented Sep 11, 2021

Copy link
Copy Markdown
Member Author

Apart from the added review comments. I think extracting out some of very large lambdas into well named functions will aid in readability as well as testability.

You'll have to quote some exact lambdas, I find it myself readable and maintainable this way.

Comment thread .github/workflows/docker-publish.yaml Resolved
@Tais993
Tais993 marked this pull request as draft September 12, 2021 01:27
@sonarqubecloud

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 13 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@Tais993
Tais993 marked this pull request as ready for review September 12, 2021 02:17
@Tais993

Tais993 commented Sep 12, 2021

Copy link
Copy Markdown
Member Author

2 things need to be fixed atm

Naming of the AvstractCommand is incorrect and bad, alternatives?

Docs mention using the interface still

Added Command and AbstractCommand for commands to extend.
Added CommandExample and SubCommandExample as examples/guides for people/animals that want to create a command.
Added the CommandHandler that actually handles the command
Added the ReloadCommand so you can reload commands

Added the CommandHandler to the EventListeners in Application.java
@Tais993
Tais993 force-pushed the feature/command-system branch from 30666e1 to 5ed98e8 Compare September 12, 2021 10:16
I-Al-Istannen
I-Al-Istannen previously approved these changes Sep 12, 2021

@I-Al-Istannen I-Al-Istannen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good for now, we'll see where we might need to take it :)

@marko-radosavljevic
marko-radosavljevic dismissed illuminator3’s stale review September 12, 2021 10:34

It's no longer relevant, spotlessApply has been run.

@marko-radosavljevic
marko-radosavljevic merged commit bd57aa5 into develop Sep 12, 2021
@illuminator3
illuminator3 deleted the feature/command-system branch September 12, 2021 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Create Command system

6 participants