Who knows anymore
This commit is contained in:
parent
b9dccf77a2
commit
94ae967201
@ -1,8 +1,8 @@
|
|||||||
FROM node:16
|
FROM node:18
|
||||||
RUN mkdir -p /usr/src/app
|
RUN mkdir -p /usr/src/app
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
COPY package.json ./
|
COPY src/package.json ./
|
||||||
RUN npm install
|
RUN npm install
|
||||||
COPY . .
|
COPY ./src .
|
||||||
CMD [ "node", "main.js" ]
|
CMD [ "node", "main.js" ]
|
@ -12,22 +12,34 @@ const { EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle } = Discord;
|
|||||||
const debugMode = process.env.DEBUG;
|
const debugMode = process.env.DEBUG;
|
||||||
const config = require('../data/config.json');
|
const config = require('../data/config.json');
|
||||||
const strings = require('../data/strings.json');
|
const strings = require('../data/strings.json');
|
||||||
const slashCommandFiles = fs.readdirSync('./slash-commands/').filter(file => file.endsWith('.js'));
|
|
||||||
|
|
||||||
const functions = {
|
const functions = {
|
||||||
// Functions for managing and creating Collections
|
// Functions for managing and creating Collections
|
||||||
collectionBuilders: {
|
collectionBuilders: {
|
||||||
// Create the collection of slash commands
|
// Create the collection of slash commands
|
||||||
slashCommands(client) {
|
slashCommands(client) {
|
||||||
|
const slashCommandFiles = fs.readdirSync('./_slashCommands/').filter(file => (file.endsWith(".js") && !file.startsWith("_")));
|
||||||
if (!client.slashCommands) client.slashCommands = new Discord.Collection();
|
if (!client.slashCommands) client.slashCommands = new Discord.Collection();
|
||||||
client.slashCommands.clear();
|
client.slashCommands.clear();
|
||||||
for (const file of slashCommandFiles) {
|
for (const file of slashCommandFiles) {
|
||||||
const slashCommand = require(`../slash-commands/${file}`);
|
const slashCommand = require(`../_slashCommands/${file}`);
|
||||||
if (slashCommand.data != undefined) {
|
if (slashCommand.data != undefined) {
|
||||||
client.slashCommands.set(slashCommand.data.name, slashCommand);
|
client.slashCommands.set(slashCommand.data.name, slashCommand);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (debugMode) console.log('Slash Commands Collection Built');
|
if (debugMode) console.log('Slash Commands Collection Built');
|
||||||
|
},
|
||||||
|
dotCommands(client) {
|
||||||
|
const dotCommandFiles = fs.readdirSync('./_dotCommands/').filter(file => (file.endsWith(".js") && !file.startsWith("_")));
|
||||||
|
if (!client.dotCommands) client.dotCommands = new Discord.Collection();
|
||||||
|
client.dotCommands.clear();
|
||||||
|
for (const file of dotCommandFiles) {
|
||||||
|
const dotCommand = require(`../_dotCommands/${file}`);
|
||||||
|
if (dotCommand.data != undefined) {
|
||||||
|
client.dotCommands.set(dotCommand.data.name, dotCommand);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (debugMode) console.log('Slash Commands Collection Built');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
builders: {
|
builders: {
|
Loading…
Reference in New Issue
Block a user