async function followChannel(
  sourceChannelId,
  targetChannelId,
) {
  await requireBotChannelPermissions(targetChannelId, [
    "MANAGE_WEBHOOKS",
  ]);
  const data = await rest.runMethod(
    "post",
    endpoints.CHANNEL_FOLLOW(sourceChannelId),
    {
      webhook_channel_id: targetChannelId,
    },
  );
  return data.webhookId;
}
/** Follow a News Channel to send messages to a target channel. Requires the `MANAGE_WEBHOOKS` permission in the target channel. Returns the webhook id. */
Follow a News Channel to send messages to a target channel. Requires the `MANAGE_WEBHOOKS` permission in the target channel. Returns the webhook id.
Follow a News Channel to send messages to a target channel . Requires the ` MANAGE_WEBHOOKS ` permission in the target channel . Returns the webhook id .
async function followChannel(
  sourceChannelId,
  targetChannelId,
) {
  await requireBotChannelPermissions(targetChannelId, [
    "MANAGE_WEBHOOKS",
  ]);
  const data = await rest.runMethod(
    "post",
    endpoints.CHANNEL_FOLLOW(sourceChannelId),
    {
      webhook_channel_id: targetChannelId,
    },
  );
  return data.webhookId;
}
async function followChannel ( sourceChannelId , targetChannelId , ) { await requireBotChannelPermissions ( targetChannelId , [ "MANAGE_WEBHOOKS" , ] ) ; const data = await rest . runMethod ( "post" , endpoints . CHANNEL_FOLLOW ( sourceChannelId ) , { webhook_channel_id : targetChannelId , } , ) ; return data . webhookId ; }
Follow a News Channel to send messages to a target channel.
Follow a News Channel to send messages to a target channel .