پرش به مطلب اصلی

forwardMessage

باز ارسال کردن پیام به چت دیگر.

ورودی‌ها

نامنوعتوضیح
chat_idstringآیدی چتی که پیام در ان ارسال شده است.
message_idstringشناسه پیام ارسال شده
to_chat_idstringآیدی چتی که پیام باید به ان فروارد شود.
disable_notificationboolean (پیش‌فرض: false)اگر true باشد، پیام بدون نوتیفیکیشن

خروجی

فیلدنوعتوضیح
new_message_idstringشناسه پیام جدید

نحوه استفاده

const { Bot } = require("rubjs");

const bot = new Bot("YOUR_TOKEN");

bot.command("/forward", async (ctx) => {
await bot.forwardMessage(
ctx.chat_id,
ctx.new_message.message_id,
ctx.chat_id
);
});

bot.run();