Skip to content
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

Add Support For Slash Commands #73

Closed
wants to merge 64 commits into from
Closed

Conversation

tk2217
Copy link
Member

@tk2217 tk2217 commented Nov 18, 2021

This pull request includes slash command support and a LOT of refactoring.

Full List of Changes

  • Add slash command support.
  • Refactor the samquote command extensively.
  • Slight refactoring of the command system.
  • Refactors of many commands for slash command compatibility.
  • Move permission roles to the config. (More info on this below.)
  • A bit of renaming and moving stuff into packages.
  • Remove EndlessStringArgument as GreedyStringArgument (formerly MessageArgument) was identical.
  • Add FollowupReplyHandler system.

Updating

Config Changes

The following entries have been added to the config. (This can be copy-pasted into an existing config file.)

{
    "slash_commands": true,
    "graph_channel": 736019542882517062,
    "expert_chat_channel": 467729470539694091,
    "permission_roles": {
        "BOT_DEVELOPER": 589238520145510400,
        "DEVELOPER": 519740942861860874,
        "ADMINISTRATOR": 180794313494495233,
        "MODERATION": 180794061429538816,
        "EXPERT": 299109861696995329,
        "SUPPORT": 180794530398732288,
        "RETIRED_SUPPORT": 235159617108181003,
        "USER": 349434193517740033
    }
}

Other

  • I'd be happy to fix any bugs arising from these changes even after a merge.

@AstroSquared
Copy link

ooooo

Copy link
Member

@Owen1212055 Owen1212055 left a comment

Choose a reason for hiding this comment

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

I am not sure if I have any permission to review this project (not sure if you need to even follow any of this), but I would still like to give my advice.

I have been pushing back on adding slash commands just because of how limiting they are, but I guess it's fine for the to be pushed for now. I appreciate the work you put into this and with sam quotes.

Here is my advice here, generally the idea I had in mine for slash commands was not for slash commands to be "messily" integrated into the current codebase. You have done well at that, as you have abstracted lots of the reply classes which was something that is quite perfect. The only thing here we need to try to make a little nicer here is the argument parsing, as I feel we can integrate it a little bit more abstractly.

Thank you, yet again. :)

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@tk2217
Copy link
Member Author

tk2217 commented Nov 18, 2021

I fixed a lot of the issues, but the major changes might have to wait until soon™.

@Owen1212055
Copy link
Member

I fixed a lot of the issues, but the major changes might have to wait until soon™.

Take your time here, this is a pretty major change and it's important we get this right. :)

There is no rush here

@tk2217
Copy link
Member Author

tk2217 commented Nov 19, 2021

Ye I'm on Thanksgiving break now so lots of time to program stuff.

@tk2217 tk2217 marked this pull request as draft November 24, 2021 21:14
@tk2217 tk2217 marked this pull request as draft May 2, 2022 23:11
@tk2217
Copy link
Member Author

tk2217 commented May 2, 2022

Converting to draft due to changes in #80 that I'd like to merge into here.

@tk2217
Copy link
Member Author

tk2217 commented Jun 16, 2022

Merged from #80.

This mostly works, except for command permissions, which may require an upgrade to JDA v5 and some additional considerations. Additional considerations include possibly moving to the mardadb jdbc connector and updating the action dump, which I have updated to a newer version of mcprotocollib but have not moved to msa.

@tk2217
Copy link
Member Author

tk2217 commented Jun 16, 2022

Going to hold off on merging this until Discord improves slash command permissions -- we don't want to expose internal moderation commands.

@RedDaedalus any thoughts on how we should continue here?

@tk2217
Copy link
Member Author

tk2217 commented Oct 2, 2022

I'm going to close this for now since it's become somewhat of a world plots moment but some stuff will probably make it into some smaller prs.

@tk2217 tk2217 closed this Oct 2, 2022
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.

5 participants