JDA
JDA copied to clipboard
Add support for guild scheduled events v2
- [x] I have checked the PRs for upcoming features/bug fixes.
- [x] I have read the [contributing guidelines][contributing].
Changes
- [x] Internal code
- [x] Library interface (affecting end-user code)
- [x] Documentation
- [ ] Other: _____
Description
This PR adds support for Guild Scheduled Events. This PR is based on a previous PR #1905 by @Yashar256. The previous PR is a few versions behind and only outlined the general structure of the implementation. It was quite far away from a working implementation. It did however have the documentation done for the most part. I was advised to make it a separate PR, if this is an issue please let me know / delete this PR.
Creating a Guild Scheduled Event:
guild.createScheduledEvent("Monday Meeting", voiceChannel, OffsetDateTime.now().plusHours(1)).queue();
Known issues:
- When a guild object is created and an existing event is tied to a voice or stage channel thats not viewable by the bot, the guild scheduled event is not sent with the guild payload. When the permissions on the voice or stage channel change, the guild scheduled event won't be cached regardless (until it is retrieved or the guild scheduled event is edited). I'm not sure if there is anything we can do against that, but I'm writing it down here anyway. In my opinion, this is discords issue to resolve as the guild scheduled event should have been sent in the guild payload regardless of wether the channel was viewable for the bot. Same behaviour we have with channels.
- The channel permission "Manage Events" is not working at all, this is a discord issue. (Was resolved a while ago)
I apologize in advance for any beginner mistakes, this is my first time working on JDA internals.
When will this pr gets merged?
Just a heads up on why this PR is a bit stale at the moment. The reviews came at an inconvenient time for me as I'm busy for the entirety of April (travel+moving). I'll get back on it in 3-4 weeks from now though.
Bump. Considering start a review here soon but unclear on the activity in this PR. Is this orphaned?
Bump. Considering start a review here soon but unclear on the activity in this PR. Is this orphaned?
I'm currently busy with moving to another country so I can't get to resolve the suggestions for at least until june. If anyone wants to speed up the process and lend a hand it would be welcome.