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

createPoll

TODO: توضیحات مربوط به createPoll را وارد کنید.

ورودی‌ها​

نامنوع
object_guidstring
questionstring
optionsstring[]
type`"Regular"
is_anonymousboolean (اختیاری، پیش‌فرض: true)
allows_multiple_answersboolean (اختیاری، پیش‌فرض: true)
correct_option_indexnumber (اختیاری)
explanationstring (اختیاری)
reply_to_message_idstring (اختیاری)

خروجی​

unknown


نحوه استفاده​

import Client from "rubika/client";

const client = new Client("session-name");

client.command("/createPoll", async (ctx) => {
await client.createPoll(
"object_guid: string",
"question: string",
"options: string[]",
"Regular",
true,
true,
"correct_option_index: number",
"explanation: string",
"reply_to_message_id: string"
);
});

client.run();