-
Notifications
You must be signed in to change notification settings - Fork 91
Add support for application emojis #973
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
Conversation
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.
Few little things need fixing like route keys and Discord not supporting audit log reasons.
| keys[Route.EmojiId] = emojiId | ||
| } | ||
|
|
||
| public suspend fun createApplicationEmoji(appId: Snowflake, request: EmojiCreateRequest): DiscordEmoji = |
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.
Technically application emojis don't have roles, which the Emoji(Create/Modify) builders expose. Discord seems to just ignore it which is fine. Up to you how 1:1 to stick with Discord API.
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.
I think breaking the API for this is not worth it, so let's just leave this as is
| appId: Snowflake, | ||
| name: String, | ||
| image: Image, | ||
| builder: EmojiCreateBuilder.() -> Unit |
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.
In this case, since application emojis are just name and image, you can probably get rid of the builder parameter.
| * @param reason the reason showing up in the audit log | ||
| * @throws RequestException if anything went wrong during the request. | ||
| */ | ||
| public abstract suspend fun delete(reason: String? = null) |
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.
Only guild emojis support deleting with a reason. We can just ignore it in the case of application emojis. Or make CustomEmoji#delete take no reason, and add a GuildEmoji#delete that takes a reason?
Co-authored-by: Marko <[email protected]>
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.
LGTM
…moji # Conflicts: # core/api/core.api
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.
Sorry for the late review after merge, can you address my comments in a followup PR @DRSchlaubi?
|
See 2002d0c...eaf5dbe for a cleaner diff of ABI changes. |
No description provided.