import TwitterTypes from 'twitter-d'; import QQBot from './koishi'; interface IWorkerOption { lock: ILock; lockfile: string; bot: QQBot; workInterval: number; webshotDelay: number; consumerKey: string; consumerSecret: string; accessTokenKey: string; accessTokenSecret: string; mode: number; wsUrl: string; redis?: IRedisConfig; } export declare class ScreenNameNormalizer { static _queryUser: (username: string) => Promise; static normalize: (username: string) => string; static normalizeLive(username: string): Promise; } export declare let sendTweet: (id: string, receiver: IChat) => void; export interface ITimelineQueryConfig { username: string; count?: number; since?: string; until?: string; noreps?: boolean; norts?: boolean; } export declare let sendTimeline: (conf: { username: string; count?: string; since?: string; until?: string; noreps?: string; norts?: string; }, receiver: IChat) => void; export declare type FullUser = TwitterTypes.FullUser; export declare type Entities = TwitterTypes.Entities; export declare type ExtendedEntities = TwitterTypes.ExtendedEntities; export declare type MediaEntity = TwitterTypes.MediaEntity; interface ITweet extends TwitterTypes.Status { user: FullUser; retweeted_status?: Tweet; } export declare type Tweet = ITweet; export declare type Tweets = ITweet[]; export default class { private client; private lock; private lockfile; private workInterval; private bot; private webshotDelay; private webshot; private mode; private wsUrl; private redis; constructor(opt: IWorkerOption); launch: () => void; queryUser: (username: string) => Promise; queryTimelineReverse: (conf: ITimelineQueryConfig) => Promise; queryTimeline: ({ username, count, since, until, noreps, norts }: ITimelineQueryConfig) => Promise; private workOnTweets; getTweet: (id: string, sender: (id: string, msg: string, text: string, author: string) => void) => Promise; private sendTweets; work: () => void; } export {};