Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Guild#retrieveScheduledEvents #2707

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

V-Play-Games
Copy link
Contributor

Pull Request Etiquette

Changes

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

Closes Issue: #2700

Description

Adds Guild#retrieveScheduledEvents to retrieve a list of scheduled events

@Override
public RestAction<List<ScheduledEvent>> retrieveScheduledEvents()
{
Route.CompiledRoute route = Route.Guilds.GET_SCHEDULED_EVENTS.compile(getId());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about the with_user_count query parameter?

response.getArray()
.stream(DataArray::getObject)
.map(json -> api.getEntityBuilder().createScheduledEvent(this, json))
.collect(Collectors.toList()));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.collect(Collectors.toList()));
.collect(Helpers.toUnmodifiableList()));

@V-Play-Games V-Play-Games marked this pull request as draft July 24, 2024 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants