mirror of
https://github.com/BluemediaDev/muse.git
synced 2025-06-27 09:12:43 +02:00
Remove Config injection from PlayerManager as we are getting the values from prisma.
This commit is contained in:
parent
27b1a25e56
commit
ba3f1d60c3
1 changed files with 2 additions and 5 deletions
|
@ -2,25 +2,22 @@ import {inject, injectable} from 'inversify';
|
|||
import {TYPES} from '../types.js';
|
||||
import Player from '../services/player.js';
|
||||
import FileCacheProvider from '../services/file-cache.js';
|
||||
import Config from '../services/config.js';
|
||||
|
||||
@injectable()
|
||||
export default class {
|
||||
private readonly guildPlayers: Map<string, Player>;
|
||||
private readonly fileCache: FileCacheProvider;
|
||||
private readonly config: Config;
|
||||
|
||||
constructor(@inject(TYPES.FileCache) fileCache: FileCacheProvider, @inject(TYPES.Config) config: Config) {
|
||||
constructor(@inject(TYPES.FileCache) fileCache: FileCacheProvider) {
|
||||
this.guildPlayers = new Map();
|
||||
this.fileCache = fileCache;
|
||||
this.config = config;
|
||||
}
|
||||
|
||||
get(guildId: string): Player {
|
||||
let player = this.guildPlayers.get(guildId);
|
||||
|
||||
if (!player) {
|
||||
player = new Player(this.fileCache, guildId, this.config);
|
||||
player = new Player(this.fileCache, guildId);
|
||||
|
||||
this.guildPlayers.set(guildId, player);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue