mirror of
https://github.com/BluemediaDev/muse.git
synced 2025-05-11 12:21:37 +02:00
Use manager instances for guild services
This commit is contained in:
parent
0cebca7917
commit
3408c7a0c2
13 changed files with 178 additions and 162 deletions
|
@ -15,9 +15,9 @@ import {
|
|||
CACHE_DIR
|
||||
} from './utils/config';
|
||||
|
||||
// Services
|
||||
import Queue from './services/queue';
|
||||
import Player from './services/player';
|
||||
// Managers
|
||||
import PlayerManager from './managers/player';
|
||||
import QueueManager from './managers/queue';
|
||||
|
||||
// Comands
|
||||
import Command from './commands';
|
||||
|
@ -34,9 +34,9 @@ let container = new Container();
|
|||
container.bind<Bot>(TYPES.Bot).to(Bot).inSingletonScope();
|
||||
container.bind<Client>(TYPES.Client).toConstantValue(new Client());
|
||||
|
||||
// Services
|
||||
container.bind<Player>(TYPES.Services.Player).to(Player).inSingletonScope();
|
||||
container.bind<Queue>(TYPES.Services.Queue).to(Queue).inSingletonScope();
|
||||
// Managers
|
||||
container.bind<PlayerManager>(TYPES.Managers.Player).to(PlayerManager).inSingletonScope();
|
||||
container.bind<QueueManager>(TYPES.Managers.Queue).to(QueueManager).inSingletonScope();
|
||||
|
||||
// Commands
|
||||
container.bind<Command>(TYPES.Command).to(Clear).inSingletonScope();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue