0

Forward a Message

by
Published Jun 6, 2022
Script telegram Verified

The script

Submitted by hugo989 Bun
Verified 6 days ago
1
import { Telegram as Telegraf } from "[email protected]";
2

3
type Telegram = {
4
  token: string;
5
};
6
export async function main(
7
  auth: Telegram,
8
  from_chat_id: string,
9
  to_chat_id: string,
10
  message_id: number,
11
) {
12
  const client = new Telegraf(auth.token);
13
  return await client.forwardMessage(to_chat_id, from_chat_id, message_id);
14
}
15

Other submissions
  • Submitted by adam186 Deno
    Created 398 days ago
    1
    import { Telegram } from "npm:[email protected]";
    2
    
    
    3
    type Telegram = {
    4
      token: string;
    5
    };
    6
    export async function main(
    7
      auth: Telegram,
    8
      from_chat_id: string,
    9
      to_chat_id: string,
    10
      message_id: number,
    11
    ) {
    12
      const client = new Telegram(auth.token);
    13
      return await client.forwardMessage(to_chat_id, from_chat_id, message_id);
    14
    }
    15