Skip to content

Commit

Permalink
Skip getting select mentions when there's no guild
Browse files Browse the repository at this point in the history
  • Loading branch information
freya022 committed Apr 11, 2024
1 parent 7fc0051 commit 8bb9df6
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ public Bag<User> getUsersBag()
@Override
public List<GuildChannel> getChannels()
{
if (guild == null)
return Collections.emptyList();
if (cachedChannels != null)
return cachedChannels;

Expand Down Expand Up @@ -151,6 +153,8 @@ public <T extends GuildChannel> Bag<T> getChannelsBag(@Nonnull Class<T> clazz)
@Override
public List<Role> getRoles()
{
if (guild == null)
return Collections.emptyList();
if (cachedRoles != null)
return cachedRoles;

Expand Down Expand Up @@ -208,6 +212,8 @@ public Bag<SlashCommandReference> getSlashCommandsBag()
@Override
public List<Member> getMembers()
{
if (guild == null)
return Collections.emptyList();
if (cachedMembers != null)
return cachedMembers;

Expand Down

0 comments on commit 8bb9df6

Please sign in to comment.