import { Telegram } from "npm:[email protected]";
import { UpdateType } from "npm:[email protected]/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 hugo697 227 days ago
import { Telegram } from "npm:[email protected]";
import { UpdateType } from "npm:[email protected]/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 860 days ago
import { Telegram } from "npm:[email protected]"
import { UpdateType } from "npm:[email protected]/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 863 days ago
import * as wmill from "https://deno.land/x/[email protected]/mod.ts"
import { Telegram } from "npm:[email protected]"
import { UpdateType } from "npm:[email protected]/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 991 days ago
import * as wmill from "https://deno.land/x/[email protected]/mod.ts"
import { Telegram } from "npm:[email protected]"
import { UpdateType } from "npm:[email protected]/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 1026 days ago
import * as wmill from "https://deno.land/x/[email protected]/mod.ts"
import { Telegram } from "npm:[email protected]"
import { UpdateType } from "npm:[email protected]/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 1108 days ago
import * as wmill from "https://deno.land/x/[email protected]/mod.ts"
import { Telegram } from "npm:[email protected]"
import { UpdateType } from "npm:[email protected]/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 1108 days ago