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

Slash command support #1

Merged
merged 5 commits into from
Jun 6, 2021
Merged

Slash command support #1

merged 5 commits into from
Jun 6, 2021

Conversation

Chew
Copy link
Owner

@Chew Chew commented Jun 1, 2021

THE CHUNKIEST PATCH IN EXISTENCE.

This adds support for Slash Commands. Phew!

Currently, this uses JDA's feature/slash-commands branch so this will be put on this repo's feature/slash-commands.

There's still a bit more to do, but it's pretty much done.

If you would like to test, you need to switch to my m2 repo:

        <repository>
            <id>chew-m2</id>
            <url>https://m2.chew.pro/snapshots/</url>
        </repository>
        <dependency>
            <groupId>pw.chew</groupId>
            <artifactId>jda-chewtils</artifactId>
            <version>1.20-SNAPSHOT</version>
            <scope>compile</scope>
            <type>pom</type>
        </dependency>

Check the wiki for migration guide.

@@ -607,6 +674,25 @@ else if(event.isFromType(ChannelType.PRIVATE) || event.getTextChannel().canTalk(
listener.onNonCommandMessage(event);
}

private void onSlashCommand(SlashCommandEvent event)
Copy link

Choose a reason for hiding this comment

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

Suggested change
private void onSlashCommand(SlashCommandEvent event)
@Override
private void onSlashCommand(SlashCommandEvent event)

Copy link
Owner Author

Choose a reason for hiding this comment

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

The overrides only appear to apply when you extend ListenerAdapter, not EventListener that CommandClientImpl does 🤔 I can't exactly tell why or what benefits it has not doing it

@Chew Chew closed this Jun 4, 2021
@Chew Chew reopened this Jun 4, 2021
@Chew Chew marked this pull request as ready for review June 4, 2021 21:12
@Chew
Copy link
Owner Author

Chew commented Jun 4, 2021

Wrong button

Chew added 2 commits June 4, 2021 23:03
Did this just not get copied over? Now I'm questioning everything...
@Chew
Copy link
Owner Author

Chew commented Jun 5, 2021

Any final thoughts @Andre601 or is this good to go?

@Andre601
Copy link

Andre601 commented Jun 5, 2021

Don't ask me

@Chew Chew merged commit 3a086dc into master Jun 6, 2021
@Chew Chew deleted the feature/slashcommands branch June 6, 2021 21:41
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.

None yet

2 participants