Skip to main content
The Deno 2 Release Candidate is here
Learn more
class MatchBotDetailsCacheService
Re-export
import { MatchBotDetailsCacheService } from "https://deno.land/x/sptaki@1.2.0/services/mod.ts";

Cache bots in a dictionary, keyed by the bots name, keying by name isnt ideal as its not unique but this is used by the post-raid system which doesnt have any bot ids, only name

Constructors

new
MatchBotDetailsCacheService(logger: ILogger, localisationService: LocalisationService)

Properties

protected
botDetailsCache: Record<string, IBotBase>
protected
localisationService: LocalisationService
protected
logger: ILogger

Methods

cacheBot(botToCache: IBotBase): void

Store a bot in the cache, keyed by its name

clearCache(): void

Clean the cache of all bot details

getBotByNameAndSide(botName: string, botSide: string): IBotBase

Find a bot in the cache by its name and side