JDA-Applications / JDA-Utilities

A series of tools and utilities for JDA to assist in bot creation
Apache License 2.0
218 stars 111 forks source link

Add singleSelectionMode to SelectionDialog #75

Closed kantenkugel closed 4 years ago

kantenkugel commented 6 years ago

Pull Request

Pull Request Checklist

Please follow the following steps before opening this PR.
PRs that do not complete the checklist will be subject to denial for missing information.

Pull Request Information

Check and fill in the blanks for all that apply:

Description

Currently, SelectionDialog will continue showing options when the SELECT emoji was pressed. This makes it impossible for example to edit the menu message to show results, as the Menu itself will just re-render its current option and wait for further events.

This PR adds a new Builder setting useSingleSelectionMode(boolean) which allows for the Menu to exit after SELECT was pressed.

The default behavior is the same as before: continue listening