mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
docs(channel): Clarify emoji parameter (#10595)
* docs(channel): clarify emoji parameter * docs: actually add `@example` * docs: clarify the kind of encoding Co-Authored-By: Vlad Frangu <me@vladfrangu.dev> --------- Co-authored-by: Vlad Frangu <me@vladfrangu.dev> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
@@ -92,9 +92,17 @@ export class ChannelsAPI {
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#get-reactions}
|
||||
* @param channelId - The id of the channel the message is in
|
||||
* @param messageId - The id of the message to get the reactions for
|
||||
* @param emoji - The emoji to get the reactions for
|
||||
* @param emoji - The emoji to get the reactions for. URL encoding happens internally
|
||||
* @param query - The query options for fetching the reactions
|
||||
* @param options - The options for fetching the message reactions
|
||||
* @example
|
||||
* ```ts
|
||||
* // Unicode.
|
||||
* await api.channels.getMessageReactions('1234567890', '1234567890', '👍');
|
||||
*
|
||||
* // Custom emoji.
|
||||
* await api.channels.getMessageReactions('1234567890', '1234567890', 'emoji_name:1234567890');
|
||||
* ```
|
||||
*/
|
||||
public async getMessageReactions(
|
||||
channelId: Snowflake,
|
||||
@@ -115,8 +123,16 @@ export class ChannelsAPI {
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#delete-own-reaction}
|
||||
* @param channelId - The id of the channel the message is in
|
||||
* @param messageId - The id of the message to delete the reaction for
|
||||
* @param emoji - The emoji to delete the reaction for
|
||||
* @param emoji - The emoji to delete the reaction for. URL encoding happens internally
|
||||
* @param options - The options for deleting the reaction
|
||||
* @example
|
||||
* ```ts
|
||||
* // Unicode.
|
||||
* await api.channels.deleteOwnMessageReaction('1234567890', '1234567890', '👍');
|
||||
*
|
||||
* // Custom emoji.
|
||||
* await api.channels.deleteOwnMessageReaction('1234567890', '1234567890', 'emoji_name:1234567890');
|
||||
* ```
|
||||
*/
|
||||
public async deleteOwnMessageReaction(
|
||||
channelId: Snowflake,
|
||||
@@ -135,9 +151,17 @@ export class ChannelsAPI {
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#delete-user-reaction}
|
||||
* @param channelId - The id of the channel the message is in
|
||||
* @param messageId - The id of the message to delete the reaction for
|
||||
* @param emoji - The emoji to delete the reaction for
|
||||
* @param emoji - The emoji to delete the reaction for. URL encoding happens internally
|
||||
* @param userId - The id of the user to delete the reaction for
|
||||
* @param options - The options for deleting the reaction
|
||||
* @example
|
||||
* ```ts
|
||||
* // Unicode.
|
||||
* await api.channels.deleteUserMessageReaction('1234567890', '1234567890', '👍', '1234567890');
|
||||
*
|
||||
* // Custom emoji.
|
||||
* await api.channels.deleteUserMessageReaction('1234567890', '1234567890', 'emoji_name:1234567890', '1234567890');
|
||||
* ```
|
||||
*/
|
||||
public async deleteUserMessageReaction(
|
||||
channelId: Snowflake,
|
||||
@@ -173,8 +197,16 @@ export class ChannelsAPI {
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#delete-all-reactions-for-emoji}
|
||||
* @param channelId - The id of the channel the message is in
|
||||
* @param messageId - The id of the message to delete the reactions for
|
||||
* @param emoji - The emoji to delete the reactions for
|
||||
* @param emoji - The emoji to delete the reactions for. URL encoding happens internally
|
||||
* @param options - The options for deleting the reactions
|
||||
* @example
|
||||
* ```ts
|
||||
* // Unicode.
|
||||
* await api.channels.deleteAllMessageReactionsForEmoji('1234567890', '1234567890', '👍');
|
||||
*
|
||||
* // Custom emoji.
|
||||
* await api.channels.deleteAllMessageReactionsForEmoji('1234567890', '1234567890', 'emoji_name:1234567890');
|
||||
* ```
|
||||
*/
|
||||
public async deleteAllMessageReactionsForEmoji(
|
||||
channelId: Snowflake,
|
||||
@@ -191,8 +223,16 @@ export class ChannelsAPI {
|
||||
* @see {@link https://discord.com/developers/docs/resources/message#create-reaction}
|
||||
* @param channelId - The id of the channel the message is in
|
||||
* @param messageId - The id of the message to add the reaction to
|
||||
* @param emoji - The emoji to add the reaction with
|
||||
* @param emoji - The emoji to add the reaction with. URL encoding happens internally
|
||||
* @param options - The options for adding the reaction
|
||||
* @example
|
||||
* ```ts
|
||||
* // Unicode.
|
||||
* await api.channels.addMessageReaction('1234567890', '1234567890', '👍');
|
||||
*
|
||||
* // Custom emoji.
|
||||
* await api.channels.addMessageReaction('1234567890', '1234567890', 'emoji_name:1234567890');
|
||||
* ```
|
||||
*/
|
||||
public async addMessageReaction(
|
||||
channelId: Snowflake,
|
||||
|
||||
Reference in New Issue
Block a user