BLANKHumanity / blank-humanity-discord-bot

2 stars 0 forks source link

Bump JDA from 5.0.0-alpha.9 to 5.0.0-alpha.11 #65

Closed dependabot[bot] closed 2 years ago

dependabot[bot] commented 2 years ago

Bumps JDA from 5.0.0-alpha.9 to 5.0.0-alpha.11.

Release notes

Sourced from JDA's releases.

v5.0.0-alpha.11 | Modals

Overview

This release finally brings out modals! This includes a variety of constructs, but the key ones to be immediately aware of are:

  • Modal
  • TextInput
  • ModalInteraction
  • ModalInteractionEvent
  • IModalCallback (replyModal(modal))

Modal Example

@Override
public void onSlashCommandInteraction(@Nonnull SlashCommandInteractionEvent event) {
    if (event.getName().equals("support")) {
        TextInput email = TextInput.create("email", "Email", TextInputStyle.SHORT)
                .setPlaceholder("Enter your E-mail")
                .setMinLength(10)
                .setMaxLength(100) // or setRequiredRange(10, 100)
                .build();
    TextInput body = TextInput.create("body", "Body", TextInputStyle.PARAGRAPH)
            .setPlaceholder("Your concerns go here")
            .setMinLength(30)
            .setMaxLength(1000)
            .build();

    Modal modal = Modal.create("support", "Support")
            .addActionRows(ActionRow.of(email), ActionRow.of(body))
            .build();

    event.replyModal(modal).queue();
}

}

@Override
public void onModalInteraction(@Nonnull ModalInteractionEvent event) {
    if (event.getModalId().equals("support")) {
        String email = event.getValue("email").getAsString();
        String body = event.getValue("body").getAsString();

        createSupportTicket(email, body);

        event.reply("Thanks for your request!").setEphemeral(true).queue();
    }
}

New Features

... (truncated)

Commits


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
dependabot[bot] commented 2 years ago

Superseded by #69.