Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,9 @@ declare namespace Eris {
interface ApplicationEmojiOptions extends EditApplicationEmojiOptions {
image: string;
}
interface ApplicationEmojis {
items: ApplicationEmojiOptions[];
Copy link
Collaborator

Choose a reason for hiding this comment

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

This returns an array of emojis, not something we send to discord

}
interface PartialEmoji {
id: string | null;
name: string;
Expand Down Expand Up @@ -2294,7 +2297,7 @@ declare namespace Eris {
getDiscoveryCategories(): Promise<DiscoveryCategory[]>;
getDMChannel(userID: string): Promise<DMChannel>;
getEmoji(emojiID: string): Promise<Emoji>;
getEmojis(): Promise<Emoji[]>;
getEmojis(): Promise<ApplicationEmojis>;
getEmojiGuild(emojiID: string): Promise<Guild>;
getGateway(): Promise<{ url: string }>;
getGuildAuditLog(guildID: string, options?: GetGuildAuditLogOptions): Promise<GuildAuditLog>;
Expand Down
4 changes: 2 additions & 2 deletions lib/Client.js
Original file line number Diff line number Diff line change
Expand Up @@ -2640,10 +2640,10 @@ class Client extends EventEmitter {

/**
* Get the emojis for this application
* @returns {Promise<Array<Object>>} Resolves with an array of emoji objects
* @returns {Promise<Object>} Resolves with an object that contains a property "items" which is an array of emoji objects
*/
getEmojis() {
return this.requestHandler.request("GET", Endpoints.APPLICATION_EMOJIS(this.application.id), true).then((data) => data.items);
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

}

/**
Expand Down