add the player
This commit is contained in:
parent
72869224e1
commit
5feb1b2742
2 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue