-
-
Notifications
You must be signed in to change notification settings - Fork 735
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
Application hosted Emoji support #2712
Conversation
+ remove TODOs
RestAction<Void> deleteApplicationEmojiById(long emojiId); | ||
|
||
@CheckReturnValue | ||
default RestAction<Void> deleteApplicationEmojiById(@Nonnull String emojiId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The String
overload should be implemented, and the long
overload should be the default method, to avoid converting twice
|
||
@Nullable | ||
@CheckReturnValue | ||
default RestAction<ApplicationEmoji> updateApplicationEmojiName(@Nonnull String emojiId, @Nonnull String name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The String
overload should be implemented, and the long
overload should be the default method, to avoid converting twice
|
||
@Nullable | ||
@CheckReturnValue | ||
default RestAction<ApplicationEmoji> retrieveApplicationEmojiById(@Nonnull String emojiId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The String
overload should be implemented, and the long
overload should be the default method, to avoid converting twice
* The format {@code :smiley:} is a client-side alias which is replaced by the unicode emoji, not a custom emoji.</b> | ||
* | ||
* @see JDA#retrieveApplicationEmojiById(long) | ||
* @see JDA#retrieveApplicationEmojis() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps also add JDA#createApplicationEmoji(...)
*/ | ||
RestAction<Void> delete(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*/ | |
RestAction<Void> delete(); | |
*/ | |
@Nonnull | |
@CheckReturnValue | |
RestAction<Void> delete(); |
@CheckReturnValue | ||
RestAction<List<ApplicationEmoji>> retrieveApplicationEmojis(); | ||
|
||
@Nullable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Nullable | |
@Nonnull |
@CheckReturnValue | ||
RestAction<ApplicationEmoji> createApplicationEmoji(@Nonnull String name, @Nonnull Icon icon); | ||
|
||
@CheckReturnValue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@CheckReturnValue | |
@Nonnull | |
@CheckReturnValue |
JDA getJDA(); | ||
|
||
/** | ||
* The user who created this emoji |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably tell when this is null, which to my knowledge is only after creating it
@Override | ||
public UnicodeEmoji asUnicode() | ||
{ | ||
throw new IllegalStateException("Cannot convert CustomEmoji to UnicodeEmoji!"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
throw new IllegalStateException("Cannot convert CustomEmoji to UnicodeEmoji!"); | |
throw new IllegalStateException("Cannot convert ApplicationEmoji to UnicodeEmoji!"); |
Checks.notBlank(name, "Name"); | ||
name = name.trim(); | ||
Checks.inRange(name, 2, 32, "Name"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those aren't the same checks as JDA#updateApplicationEmojiName
I also don't think the input should be changed
Check that this matches Checks#ALPHANUMERIC_WITH_DASH
@Andre601 are you still working on this? I would really like this being in the master. |
Yeah, I can't find motivation to continue working on this, so I would be happy if someone could take over the changes, so that I can close this PR... |
I will take a look. I don't know how fast I can take over the changes. I will message you (@Andre601) when I did it ok? |
Pull Request Etiquette
Changes
Closes Issue: NaN
Description
Supersedes #2706 with a cleaned up commit list and implementation of freya022's addition of
createApplicationEmoji(String, Icon)