Skip to content

Commit

Permalink
expose getKnownCustomEmojiOrCreateCustomEmoji
Browse files Browse the repository at this point in the history
  • Loading branch information
bassner committed Aug 2, 2021
1 parent 69c9197 commit 14f2ecc
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions javacord-api/src/main/java/org/javacord/api/DiscordApi.java
Expand Up @@ -1222,6 +1222,19 @@ default Collection<KnownCustomEmoji> getCustomEmojisByNameIgnoreCase(String name
.collect(Collectors.toList()));
}

/**
* Creates or gets a custom emoji to be used in other Javacord APIs. Use this if the custom emoji you're looking
* for is hosted on a different shard, and can't be accessed through {@code getCustomEmojiById()}.
* If the custom emoji is known, the method will return the known custom emoji instead of creating a new one.
* The method will always return a non-null value, even if the emoji does not really exist.
*
* @param id the ID of the custom emoji
* @param name the name of the custom emoji
* @param animated true if the emoji is animated; false otherwise
* @return the new (unknown) custom emoji instance
*/
CustomEmoji getKnownCustomEmojiOrCreateCustomEmoji(long id, String name, boolean animated);

/**
* Gets a collection with all roles the bot knows.
*
Expand Down

0 comments on commit 14f2ecc

Please sign in to comment.