Edits history of script submission #22576 for ' Send a Photo (telegram)'

  • bun
    One script reply has been approved by the moderators
    Ap­pro­ved
    import { Telegram as Telegraf } from "[email protected]";
    /**
     * @param photo The path or URL to the image.
     */
    type Telegram = {
      token: string;
    };
    export async function main(
      auth: Telegram,
      chat_id: string | number,
      photo: string,
      reply_to_message_id?: number,
    ) {
      const client = new Telegraf(auth.token);
      return await client.sendPhoto(chat_id, photo, {
        reply_to_message_id,
      });
    }
    

    Submitted by hugo989 7 days ago