updateBotEndpoints
تغییر ادرس وبهوک
ورودیها
نام | نوع | توضیح |
---|---|---|
url | string | آدرس وبهوک |
type | UpdateEndpointTypeEnum | نوع آدرس |
خروجی
- هیچ مقداری باز نمیگرداند. در صورت خطا، یک استثناء پرتاب میشود.
نحوه استفاده
const { Bot } = require("rubjs");
const bot = new Bot("YOUR_TOKEN");
const url = "https://example.com";
bot.command("/url", async (ctx) => {
await bot.updateBotEndpoints(url, "ReceiveUpdate");
});
bot.run();