import { Telegram } from "npm:telegraf@4.11";
import { UpdateType } from "npm:telegraf@4.11/typings/telegram-types";
/**
* @param limit Number of elements in the returned list.
* Defaults to 100 and must be between 1-100.
*
* @param offset Identifier of the first update to be returned.
*
* @param allowed_updates The update types that should be received.
* Read more about types at
* https://core.telegram.org/bots/api#update
*/
type Telegram = {
token: string;
};
export async function main(
auth: Telegram,
limit = 100,
offset = 0,
allowed_updates?: UpdateType[],
) {
const client = new Telegram(auth.token);
return await client.getUpdates(
0,
limit,
offset,
allowed_updates || undefined,
);
}
Submitted by admin 511 days ago
import { Telegram } from "npm:telegraf@4.11"
import { UpdateType } from "npm:telegraf@4.11/typings/telegram-types";
/**
* @param limit Number of elements in the returned list.
* Defaults to 100 and must be between 1-100.
*
* @param offset Identifier of the first update to be returned.
*
* @param allowed_updates The update types that should be received.
* Read more about types at
* https://core.telegram.org/bots/api#update
*/
type Telegram = {
token: string;
};
export async function main(
auth: Telegram,
limit = 100,
offset = 0,
allowed_updates?: UpdateType[]
) {
const client = new Telegram(auth.token)
return await client.getUpdates(
0,
limit,
offset,
allowed_updates || undefined
)
}
Submitted by admin 514 days ago
import * as wmill from "https://deno.land/x/windmill@v1.85.0/mod.ts"
import { Telegram } from "npm:telegraf@4.11"
import { UpdateType } from "npm:telegraf@4.11/typings/telegram-types";
/**
* @param limit Number of elements in the returned list.
* Defaults to 100 and must be between 1-100.
*
* @param offset Identifier of the first update to be returned.
*
* @param allowed_updates The update types that should be received.
* Read more about types at
* https://core.telegram.org/bots/api#update
*/
export async function main(
auth: wmill.Resource<"telegram">,
limit = 100,
offset = 0,
allowed_updates?: UpdateType[]
) {
const client = new Telegram(auth.token)
return await client.getUpdates(
0,
limit,
offset,
allowed_updates || undefined
)
}
Submitted by adam186 642 days ago
import * as wmill from "https://deno.land/x/windmill@v1.70.1/mod.ts"
import { Telegram } from "npm:telegraf@4.11"
import { UpdateType } from "npm:telegraf@4.11/typings/telegram-types";
/**
* @param limit Number of elements in the returned list.
* Defaults to 100 and must be between 1-100.
*
* @param offset Identifier of the first update to be returned.
*
* @param allowed_updates The update types that should be received.
* Read more about types at
* https://core.telegram.org/bots/api#update
*/
export async function main(
auth: wmill.Resource<"telegram">,
limit = 100,
offset = 0,
allowed_updates?: UpdateType[]
) {
const client = new Telegram(auth.token)
return await client.getUpdates(
0,
limit,
offset,
allowed_updates || undefined
)
}
Submitted by adam186 677 days ago
import * as wmill from "https://deno.land/x/windmill@v1.53.0/mod.ts"
import { Telegram } from "npm:telegraf@4.11"
import { UpdateType } from "npm:telegraf@4.11/typings/telegram-types";
/**
* @param limit Number of elements in the returned list.
* Defaults to 100 and must be between 1-100.
*
* @param offset Identifier of the first update to be returned.
*
* @param allowed_updates The update types that should be received.
* Read more about types at
* https://core.telegram.org/bots/api#update
*/
export async function main(
auth: wmill.Resource<"telegram">,
limit = 100,
offset = 0,
allowed_updates?: UpdateType[]
) {
const client = new Telegram(auth.token)
return await client.getUpdates(
0,
limit,
offset,
allowed_updates || undefined
)
}
Submitted by adam186 759 days ago
import * as wmill from "https://deno.land/x/windmill@v1.53.0/mod.ts"
import { Telegram } from "npm:telegraf@4.11"
import { UpdateType } from "npm:telegraf@4.11/typings/telegram-types";
/**
* @param limit Number of elements in the returned list.
* Defaults to 100 and must be between 1-100.
*
* @param offset Identifier of the first update to be returned.
*
* @param allowed_updates The update types that should be received.
* Read more about types at
* https://core.telegram.org/bots/api#update
*/
export async function main(
auth: wmill.Resource<"telegram">,
limit = 100,
offset = 0,
allowed_updates?: UpdateType[]
) {
const client = new Telegram(auth.token)
console.log(allowed_updates)
return await client.getUpdates(
0,
limit,
offset,
allowed_updates || undefined
)
}
Submitted by adam186 759 days ago