Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@DRSchlaubi
Copy link
Member

No description provided.

Copy link
Contributor

@psmarko psmarko left a 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 =
Copy link
Contributor

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.

Copy link
Member Author

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
Copy link
Contributor

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)
Copy link
Contributor

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?

@DRSchlaubi DRSchlaubi requested a review from psmarko April 24, 2025 00:30
Copy link
Contributor

@psmarko psmarko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@DRSchlaubi DRSchlaubi merged commit e00f34f into main Apr 26, 2025
4 checks passed
@DRSchlaubi DRSchlaubi deleted the feature/application-emoji branch April 26, 2025 16:02
Copy link
Member

@lukellmann lukellmann left a 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?

@lukellmann
Copy link
Member

See 2002d0c...eaf5dbe for a cleaner diff of ABI changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants