Skip to main content

CommunityEmojiClient

CommunityEmojiClient = TypedEventEmitter<CommunityEmojiEvents> & object

Service client for managing custom emojis within a community. Community emojis are custom images associated with shortcodes that members can use in messages.

The client provides methods for retrieving and deleting community emojis, as well as events for real-time emoji updates. Emoji creation is managed through the community settings interface; this client provides read and delete access for apps and bots.

Access this client via rootServer.community.communityEmojis.

Type Declaration

delete()

delete(request: CommunityEmojiDeleteRequest): Promise<void>

Deletes a community emoji from the community.

Parameters

ParameterTypeDescription
requestCommunityEmojiDeleteRequestIdentifies the emoji to delete.

Returns

Promise<void>

A promise that resolves when the delete operation completes.

Throws

RootApiException with errorCode set to NoPermissionToDelete if missing required permissions, or NotFound if the emoji does not exist.

get()

get(request: CommunityEmojiGetRequest): Promise<CommunityEmoji>

Retrieves a single community emoji by its ID.

Parameters

ParameterTypeDescription
requestCommunityEmojiGetRequestIdentifies the emoji to retrieve.

Returns

Promise<CommunityEmoji>

A promise that resolves to the CommunityEmoji object.

Throws

RootApiException with errorCode set to NoPermissionToRead if missing required permissions, or NotFound if the emoji does not exist.

list()

list(): Promise<CommunityEmoji[]>

Lists all community emojis in the current community.

Returns

Promise<CommunityEmoji[]>

A promise that resolves to an array of CommunityEmoji objects.

Throws

RootApiException with errorCode set to NoPermissionToRead if missing required permissions.