@levellr/crossgram
Version:
Repost Tweets to Telegram automatically
12 lines (11 loc) • 554 B
TypeScript
import { InputMediaPhoto, InputMediaVideo } from 'typegram';
import { Telegraf } from 'telegraf';
import { TweetV2SingleStreamResult } from 'twitter-api-v2';
export declare class TweetDispatcher {
private readonly botsByChatId;
constructor();
registerChat(chatId: number, bot: Telegraf): void;
unregisterChat(chatId: number): void;
dispatch(streamResult: TweetV2SingleStreamResult): Promise<void>;
static extractMediaArrayFromTweetStreamResult(streamResult: TweetV2SingleStreamResult): Array<InputMediaPhoto | InputMediaVideo>;
}