LookAtMySuitBot/js/node_modules/mineflayer-tool/lib/TemporarySubscriber.d.ts

18 lines
495 B
TypeScript
Raw Normal View History

2023-12-24 20:08:39 -05:00
import { Bot } from 'mineflayer';
export declare class TemporarySubscriber {
readonly bot: Bot;
private readonly subscriptions;
constructor(bot: Bot);
/**
* Adds a new temporary event listener to the bot.
*
* @param event - The event to subscribe to.
* @param callback - The function to execute.
*/
subscribeTo(event: string, callback: Function): void;
/**
* Removes all attached event listeners from the bot.
*/
cleanup(): void;
}