feat: Music support #62

Merged
Anri merged 43 commits from feat/music into main 2023-02-12 01:11:10 +01:00
2 changed files with 7 additions and 0 deletions
Showing only changes of commit 5feb1b2742 - Show all commits

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