Skip to content
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

Added support for application emojis #1559

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

areodot
Copy link
Contributor

@areodot areodot commented Oct 2, 2024

Application Emojis

This simple pull request adds support for application emojis discord/discord-api-docs#7010 .

@@ -702,6 +702,13 @@ declare namespace Eris {
image: string;
roles?: string[];
}
interface ApplicationEmojiOptions {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can extend Edit options

* @returns {Promise<Object>} Resolves with an emoji object
*/
getEmoji(emojiID) {
return this.requestHandler.request("GET", Endpoints.APPLICATION_EMOJI(this.application.id, emojiID), true);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Update user cache

* @returns {Promise<Array<Object>>} Resolves with an array of emoji objects
*/
getEmojis() {
return this.requestHandler.request("GET", Endpoints.APPLICATION_EMOJIS(this.application.id), true);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Update user cache. Also this doesn't directly return an emojis array, it returns an object containing items, which is the array of emojis

@@ -2206,6 +2216,8 @@ declare namespace Eris {
getCommands(): Promise<ApplicationCommand<false>[]>;
getDiscoveryCategories(): Promise<DiscoveryCategory[]>;
getDMChannel(userID: string): Promise<DMChannel>;
getEmoji(emojiID: string): Promise<Emoji>;
getEmojis(): Promise<Emoji[]>;
Copy link
Collaborator

Choose a reason for hiding this comment

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

See relevant review

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.

2 participants