add the player

This commit is contained in:
Mylloon 2023-02-04 19:43:06 +01:00
parent 72869224e1
commit 5feb1b2742
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
2 changed files with 7 additions and 0 deletions

View file

@ -1,6 +1,7 @@
import { Collection } from "discord.js";
import { SlashCommandBuilder } from "@discordjs/builders";
import { Database } from "sqlite3";
import { Player } from "discord-player";
export {};
@ -83,6 +84,8 @@ declare module "discord.js" {
}
>;
};
/** Music player */
player: Player;
/** Store all the localizations */
locales: Map<string, Map<string, string>>;
db: Database;

View file

@ -3,6 +3,7 @@ import { readFileSync } from "fs";
import { loadLocales } from "./locales";
import "../modules/client";
import { Database } from "sqlite3";
import { Player } from "discord-player";
/** Creation of the client and definition of its properties. */
export default async () => {
@ -11,6 +12,7 @@ export default async () => {
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildVoiceStates,
],
});
@ -35,6 +37,8 @@ export default async () => {
list: new Collection(),
};
client.player = new Player(client);
console.log("Translations progression :");
client.locales = await loadLocales(client.config.default_lang);