fix: standardize command import paths to lowercase for consistency
This commit is contained in:
+1
-1
@@ -8,7 +8,7 @@
|
||||
|
||||
import { SlashCommandBuilder } from 'discord.js';
|
||||
import axios from 'axios';
|
||||
import Command from '../utils/Command.js';
|
||||
import Command from '../utils/command.js';
|
||||
|
||||
const config = {
|
||||
webSearch: {
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
// (at your option) any later version.
|
||||
|
||||
import { SlashCommandBuilder, EmbedBuilder } from 'discord.js';
|
||||
import Command from '../utils/Command.js';
|
||||
import Command from '../utils/command.js';
|
||||
|
||||
export default class HelpCommand extends Command {
|
||||
defineCommand() {
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
// (at your option) any later version.
|
||||
|
||||
import { SlashCommandBuilder, PermissionFlagsBits } from 'discord.js';
|
||||
import Command from '../utils/Command.js';
|
||||
import Command from '../utils/command.js';
|
||||
|
||||
export default class KickCommand extends Command {
|
||||
defineCommand() {
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
// (at your option) any later version.
|
||||
|
||||
import { SlashCommandBuilder } from 'discord.js';
|
||||
import Command from '../utils/Command.js';
|
||||
import Command from '../utils/command.js';
|
||||
|
||||
export default class PingCommand extends Command {
|
||||
defineCommand() {
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
// (at your option) any later version.
|
||||
|
||||
import { SlashCommandBuilder, PermissionFlagsBits } from 'discord.js';
|
||||
import Command from '../utils/Command.js';
|
||||
import Command from '../utils/command.js';
|
||||
|
||||
export default class PruneCommand extends Command {
|
||||
defineCommand() {
|
||||
|
||||
+2
-1
@@ -9,7 +9,8 @@
|
||||
"deploy": "node deploy-commands.js",
|
||||
"test": "jest",
|
||||
"test:watch": "jest --watch",
|
||||
"test:coverage": "jest --coverage"
|
||||
"test:coverage": "jest --coverage",
|
||||
"deploy:ansible": "ansible-playbook -i inventory.ini playbook.yml"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
|
||||
+13
-1
@@ -4,12 +4,23 @@
|
||||
become: yes # This enables sudo privileges
|
||||
vars:
|
||||
app_dir: /opt/kekbot
|
||||
node_version: "20.x" # Latest LTS version
|
||||
node_version: "22.x" # Latest LTS version
|
||||
|
||||
tasks:
|
||||
- name: Check if Node.js, npm, and git are installed
|
||||
command: "which {{ item }}"
|
||||
register: check_commands
|
||||
with_items:
|
||||
- node
|
||||
- npm
|
||||
- git
|
||||
ignore_errors: yes
|
||||
changed_when: false
|
||||
|
||||
- name: Install Node.js repository
|
||||
shell: |
|
||||
curl -fsSL https://deb.nodesource.com/setup_{{ node_version }} | bash -
|
||||
when: check_commands.results | select('failed') | list | length > 0
|
||||
|
||||
- name: Install Node.js, npm, and git
|
||||
apt:
|
||||
@@ -19,6 +30,7 @@
|
||||
- git
|
||||
state: present
|
||||
update_cache: yes
|
||||
when: check_commands.results | select('failed') | list | length > 0
|
||||
|
||||
- name: Create application directory
|
||||
file:
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
// utils/Command.js - Base command class for Discord bot commands
|
||||
// utils/command.js - Base command class for Discord bot commands
|
||||
// Copyright (C) 2025 Luis Bauza
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -25,7 +25,7 @@ export async function loadCommands(commandsPath, logger) {
|
||||
const commandModule = await import(filePath);
|
||||
const Command = commandModule.default;
|
||||
|
||||
const CommandBase = (await import('./Command.js')).default;
|
||||
const CommandBase = (await import('./command.js')).default;
|
||||
if (Command.prototype instanceof CommandBase) {
|
||||
// New style - class extending Command
|
||||
const commandInstance = new Command();
|
||||
|
||||
Reference in New Issue
Block a user