Migrate to slash commands (#431)

Co-authored-by: Federico fuji97 Rapetti <fuji1097@gmail.com>
This commit is contained in:
Max Isom 2022-02-05 16:16:17 -06:00 committed by GitHub
parent e883275d83
commit 56a469a999
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
51 changed files with 1270 additions and 1294 deletions

View file

@ -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);
}