mirror of
https://github.com/BluemediaDev/muse.git
synced 2025-06-28 01:32:42 +02:00
Migrate to slash commands (#431)
Co-authored-by: Federico fuji97 Rapetti <fuji1097@gmail.com>
This commit is contained in:
parent
e883275d83
commit
56a469a999
51 changed files with 1270 additions and 1294 deletions
|
@ -1,5 +1,4 @@
|
|||
import {inject, injectable} from 'inversify';
|
||||
import {Client} from 'discord.js';
|
||||
import {TYPES} from '../types.js';
|
||||
import Player from '../services/player.js';
|
||||
import FileCacheProvider from '../services/file-cache.js';
|
||||
|
@ -7,12 +6,10 @@ import FileCacheProvider from '../services/file-cache.js';
|
|||
@injectable()
|
||||
export default class {
|
||||
private readonly guildPlayers: Map<string, Player>;
|
||||
private readonly discordClient: Client;
|
||||
private readonly fileCache: FileCacheProvider;
|
||||
|
||||
constructor(@inject(TYPES.FileCache) fileCache: FileCacheProvider, @inject(TYPES.Client) client: Client) {
|
||||
constructor(@inject(TYPES.FileCache) fileCache: FileCacheProvider) {
|
||||
this.guildPlayers = new Map();
|
||||
this.discordClient = client;
|
||||
this.fileCache = fileCache;
|
||||
}
|
||||
|
||||
|
@ -20,7 +17,7 @@ export default class {
|
|||
let player = this.guildPlayers.get(guildId);
|
||||
|
||||
if (!player) {
|
||||
player = new Player(this.discordClient, this.fileCache);
|
||||
player = new Player(this.fileCache, guildId);
|
||||
|
||||
this.guildPlayers.set(guildId, player);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue