chore: merge dev to main #172
3 changed files with 11 additions and 11 deletions
|
@ -1,5 +1,5 @@
|
|||
import { readdir } from "fs/promises";
|
||||
import { removeExtension, splitFilenameExtensions } from "../utils/misc";
|
||||
import { removeExtension } from "../utils/misc";
|
||||
import {
|
||||
ChatInputCommandInteraction,
|
||||
Client,
|
||||
|
@ -10,9 +10,9 @@ import { getLocale } from "../utils/locales";
|
|||
|
||||
export default async (client: Client) => {
|
||||
// Dossier des buttons
|
||||
const buttons_categories = (await readdir(__dirname)).filter(
|
||||
(element) => splitFilenameExtensions(element)?.ext === undefined,
|
||||
);
|
||||
const buttons_categories = (await readdir(__dirname, { withFileTypes: true }))
|
||||
.filter((element) => element.isDirectory())
|
||||
.map((element) => element.name);
|
||||
|
||||
await Promise.all(
|
||||
// For each categorie
|
||||
|
|
|
@ -2,15 +2,15 @@ import { REST } from "@discordjs/rest";
|
|||
import { Routes } from "discord-api-types/v9";
|
||||
import { Client } from "discord.js";
|
||||
import { readdir } from "fs/promises";
|
||||
import { removeExtension, splitFilenameExtensions } from "../utils/misc";
|
||||
import { removeExtension } from "../utils/misc";
|
||||
|
||||
/** Load all the commands */
|
||||
export default async (client: Client) => {
|
||||
const rest = new REST({ version: "10" }).setToken(client.token!);
|
||||
|
||||
const command_categories = (await readdir(__dirname)).filter(
|
||||
(element) => splitFilenameExtensions(element)?.ext === undefined,
|
||||
);
|
||||
const command_categories = (await readdir(__dirname, { withFileTypes: true }))
|
||||
.filter((element) => element.isDirectory())
|
||||
.map((element) => element.name);
|
||||
|
||||
const commands = (
|
||||
await Promise.all(
|
||||
|
|
|
@ -5,9 +5,9 @@ import { splitFilenameExtensions } from "../utils/misc";
|
|||
|
||||
/** Load all the events */
|
||||
export default async (client: Client, isDev: boolean) => {
|
||||
const events_categories = (await readdir(__dirname)).filter(
|
||||
(element) => splitFilenameExtensions(element)?.ext === undefined,
|
||||
);
|
||||
const events_categories = (await readdir(__dirname, { withFileTypes: true }))
|
||||
.filter((element) => element.isDirectory())
|
||||
.map((element) => element.name);
|
||||
|
||||
const player = useMainPlayer();
|
||||
|
||||
|
|
Loading…
Reference in a new issue