async function removeReaction(
  channelId,
  messageId,
  reaction,
  options,
) {
  if (options?.userId) {
    await requireBotChannelPermissions(channelId, [
      "MANAGE_MESSAGES",
    ]);
  }
  if (reaction.startsWith("<:")) {
    reaction = reaction.substring(2, reaction.length - 1);
  } else if (reaction.startsWith("<a:")) {
    reaction = reaction.substring(3, reaction.length - 1);
  }
  return await rest.runMethod(
    "delete",
    options?.userId
      ? endpoints.CHANNEL_MESSAGE_REACTION_USER(
        channelId,
        messageId,
        reaction,
        options.userId,
      )
      : endpoints.CHANNEL_MESSAGE_REACTION_ME(channelId, messageId, reaction),
  );
}
/** Removes a reaction from the given user on this message, defaults to bot. Reaction takes the form of **name:id** for custom guild emoji, or Unicode characters. */
Removes a reaction from the given user on this message, defaults to bot. Reaction takes the form of **name:id** for custom guild emoji, or Unicode characters.
Removes a reaction from the given user on this message defaults to bot . Reaction takes the form of ** name : id ** for custom guild emoji or Unicode characters .
async function removeReaction(
  channelId,
  messageId,
  reaction,
  options,
) {
  if (options?.userId) {
    await requireBotChannelPermissions(channelId, [
      "MANAGE_MESSAGES",
    ]);
  }
  if (reaction.startsWith("<:")) {
    reaction = reaction.substring(2, reaction.length - 1);
  } else if (reaction.startsWith("<a:")) {
    reaction = reaction.substring(3, reaction.length - 1);
  }
  return await rest.runMethod(
    "delete",
    options?.userId
      ? endpoints.CHANNEL_MESSAGE_REACTION_USER(
        channelId,
        messageId,
        reaction,
        options.userId,
      )
      : endpoints.CHANNEL_MESSAGE_REACTION_ME(channelId, messageId, reaction),
  );
}
async function removeReaction ( channelId , messageId , reaction , options , ) { if ( options ?. userId ) { await requireBotChannelPermissions ( channelId , [ "MANAGE_MESSAGES" , ] ) ; } if ( reaction . startsWith ( "<:" ) ) { reaction = reaction . substring ( 2 , reaction . length - 1 ) ; } else if ( reaction . startsWith ( "<a:" ) ) { reaction = reaction . substring ( 3 , reaction . length - 1 ) ; } return await rest . runMethod ( "delete" , options ?. userId ? endpoints . CHANNEL_MESSAGE_REACTION_USER ( channelId , messageId , reaction , options . userId , ) : endpoints . CHANNEL_MESSAGE_REACTION_ME ( channelId , messageId , reaction ) , ) ; }
Removes a reaction from the given user on this message, defaults to bot.
Removes a reaction from the given user on this message defaults to bot .