Skip to content

Commit e2c3502

Browse files
committed
Add LazyLibrary#getOwners()
1 parent dfba6ff commit e2c3502

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/main/java/xyz/srnyx/lazylibrary/LazyLibrary.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,18 @@ public String getUserAgent() {
187187
return botClass.getSimpleName() + " via LazyLibrary";
188188
}
189189

190+
/**
191+
* Get all owners (primary and others) of the bot
192+
*
193+
* @return a set of all owner IDs of the bot
194+
*/
195+
@NotNull
196+
public Set<Long> getOwners() {
197+
final Set<Long> owners = new HashSet<>(fileSettings.owners.other);
198+
if (fileSettings.owners.primary != null) owners.add(fileSettings.owners.primary);
199+
return owners;
200+
}
201+
190202
/**
191203
* Checks if the given user ID is an owner of the bot.
192204
*

0 commit comments

Comments
 (0)