@persian-caesar/aparat.js
Version:
The aparat website services for npm package.
32 lines (31 loc) • 1.31 kB
TypeScript
import { AparatEventTypes } from '../types/types';
import { EventEmitter } from 'events';
import { UserService } from '../services/user';
export declare class AparatEventEmitter extends EventEmitter<AparatEventTypes> {
private userService;
private activeListeners;
constructor(userService: UserService);
/**
* Starts a periodic check to see if a user is live streaming.
* It checks immediately and then at every specified interval.
* Emits a "live_start" event if the user is streaming.
*
* @param username - The username to monitor for live streams.
* @param interval - Time in milliseconds between checks (default: 30000ms).
*/
startStreamCheck(username: string, interval?: number): void;
/**
* Stops the periodic live stream check for a specified user.
*
* @param username - The username whose live stream check should be stopped.
*/
stopStreamCheck(username: string): void;
}
/**
* @copyright
* Code by Sobhan-SRZA (mr.sinre) | https://github.com/Sobhan-SRZA
* Developed for Persian Caesar | https://github.com/Persian-Caesar | https://dsc.gg/persian-caesar
*
* If you encounter any issues or need assistance with this code,
* please make sure to credit "Persian Caesar" in your documentation or communications.
*/