JDA icon indicating copy to clipboard operation
JDA copied to clipboard

Add support for guild welcome screens

Open sebm253 opened this issue 3 years ago • 7 comments

Pull Request Etiquette

Changes

  • [ ] Internal code
  • [x] Library interface (affecting end-user code)
  • [ ] Documentation
  • [ ] Other: _____

Closes Issue: #1987

Description

this PR adds support for Guild welcome screens. this currently doesn't support modifying the welcome screen as I'm still figuring out a good design.

sebm253 avatar Jan 15 '22 17:01 sebm253

We should probably include creation/mutation of GuildWelcomeScreens in this PR instead of providing only read-only access.

We can likely use a simple builder system like we do with EntityBuilder to build it up.

DV8FromTheWorld avatar Feb 04 '22 06:02 DV8FromTheWorld

Something else that I forgot to mention is that GuildWelcomeScreen should be inside Guild as Guild.WelcomeScreen. This follows the pattern established by other constructs that make up the Guild itself.

DV8FromTheWorld avatar Feb 05 '22 06:02 DV8FromTheWorld

Something else that I forgot to mention is that GuildWelcomeScreen should be inside Guild as Guild.WelcomeScreen. This follows the pattern established by other constructs that make up the Guild itself.

it's intentionally in its own file because it has an inner Channel class, so I didn't want it to look like this: Guild.WelcomeScreen.Channel

sebm253 avatar Feb 05 '22 13:02 sebm253

I don't personally see a problem with Guild.WelconeScreen.Channel. The Guild.X classes represent constructs which are partials of a Guild's metadata. That metadata could be represented as Guild#getWelcomeScreenChannels, Guild#getWelcomeScreenDescription. We separate them only so that things logically make sense.

In contrast, something like GuildVoiceState or TextChannel are entities unto themselves. They are not metadata for the Guild.

DV8FromTheWorld avatar Feb 05 '22 22:02 DV8FromTheWorld

Hey any updates on this one?

Aseeef avatar Apr 27 '22 03:04 Aseeef

Hey any updates on this one?

not right now, no. I won't have time for the next 2-3 weeks, so if someone wants to tackle this earlier, let me know.

sebm253 avatar Apr 27 '22 11:04 sebm253

Yeah choosing a good design for modifying the welcome screen seems tricky. One possible design could be to have a welcome screen manager, with methods such as SortedSet<GuildWelcomeScreen.Channel> getWelcomeChannels() to see the order of the welcome screen channels while updating them, and methods such as void putChannelBeforeIndex(int index, GuildWelcomeScreen.Channel channel) and void putChannelAfterIndex(int index, GuildWelcomeScreen.Channel channel) to emulate the drag and drop ordering that people are used to in the client. And of course, more conventional methods for replacing a certain channel, removing a certain channel, etc.

Yashar256 avatar Jul 18 '22 22:07 Yashar256

Closing due to inactivity. If anyone wants to continue this based on the current master branch, feel free to open a new PR.

MinnDevelopment avatar Sep 20 '22 18:09 MinnDevelopment