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 { Collection } from "discord.js";
|
||||||
import { SlashCommandBuilder } from "@discordjs/builders";
|
import { SlashCommandBuilder } from "@discordjs/builders";
|
||||||
import { Database } from "sqlite3";
|
import { Database } from "sqlite3";
|
||||||
|
import { Player } from "discord-player";
|
||||||
|
|
||||||
export {};
|
export {};
|
||||||
|
|
||||||
|
@ -83,6 +84,8 @@ declare module "discord.js" {
|
||||||
}
|
}
|
||||||
>;
|
>;
|
||||||
};
|
};
|
||||||
|
/** Music player */
|
||||||
|
player: Player;
|
||||||
/** Store all the localizations */
|
/** Store all the localizations */
|
||||||
locales: Map<string, Map<string, string>>;
|
locales: Map<string, Map<string, string>>;
|
||||||
db: Database;
|
db: Database;
|
||||||
|
|
|
@ -3,6 +3,7 @@ import { readFileSync } from "fs";
|
||||||
import { loadLocales } from "./locales";
|
import { loadLocales } from "./locales";
|
||||||
import "../modules/client";
|
import "../modules/client";
|
||||||
import { Database } from "sqlite3";
|
import { Database } from "sqlite3";
|
||||||
|
import { Player } from "discord-player";
|
||||||
|
|
||||||
/** Creation of the client and definition of its properties. */
|
/** Creation of the client and definition of its properties. */
|
||||||
export default async () => {
|
export default async () => {
|
||||||
|
@ -11,6 +12,7 @@ export default async () => {
|
||||||
GatewayIntentBits.Guilds,
|
GatewayIntentBits.Guilds,
|
||||||
GatewayIntentBits.GuildMessages,
|
GatewayIntentBits.GuildMessages,
|
||||||
GatewayIntentBits.MessageContent,
|
GatewayIntentBits.MessageContent,
|
||||||
|
GatewayIntentBits.GuildVoiceStates,
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -35,6 +37,8 @@ export default async () => {
|
||||||
list: new Collection(),
|
list: new Collection(),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
client.player = new Player(client);
|
||||||
|
|
||||||
console.log("Translations progression :");
|
console.log("Translations progression :");
|
||||||
client.locales = await loadLocales(client.config.default_lang);
|
client.locales = await loadLocales(client.config.default_lang);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue