JDA-Utilities icon indicating copy to clipboard operation
JDA-Utilities copied to clipboard

Add Store Channels to FinderUtil

Open Mikusch opened this issue 4 years ago • 1 comments

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:

  • [ ] My PR fixes a bug, error, or other issue with the library's codebase.
  • [x] My PR is for the commons module of the JDA-Utilities library.
  • [ ] My PR creates a new module for the JDA-Utilities library: ______.

Description

This PR adds JDA 4's Store Channels to the FinderUtil class and removes the genericTextChannelSearch, genericVoiceChannelSearch, and genericCategorySearch methods in favor of one generic channel search method.

Mikusch avatar Jul 22 '19 09:07 Mikusch

findStoreChannels(String, JDA) does not query a ShardManager if it is present at the moment. This is due to ShardManager missing the related cache access methods as of version 4.BETA.0_25.

I only realized that after creating this PR (I simply thought store channels weren't cached in the ShardManager for some odd reason).

I've opened another PR over at https://github.com/DV8FromTheWorld/JDA/pull/1060 to add those methods in.

Mikusch avatar Jul 22 '19 13:07 Mikusch